From 17a4e953c9acfaef17b18bd133c453ccfb878e68 Mon Sep 17 00:00:00 2001 From: nim from KA <35317534+nim-ka@users.noreply.github.com> Date: Fri, 31 Dec 2021 03:49:23 -0500 Subject: [PATCH] Update proto.js --- proto.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proto.js b/proto.js index 0522dc8..94a1820 100644 --- a/proto.js +++ b/proto.js @@ -97,7 +97,10 @@ Object.defineProperties(Array.prototype, { class PointArray extends Array { static convert(arr) { - arr.__proto__ = PointArray.prototype + if (!(arr instanceof PointArray)) { + arr.__proto__ = PointArray.prototype + } + return arr } }