From e8641ac8122d577e4b299137c38946e7fea5ab20 Mon Sep 17 00:00:00 2001 From: nim from KA <35317534+nim-ka@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:25:14 -0500 Subject: [PATCH] Update proto.js --- proto.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto.js b/proto.js index 5ea5961..1469fa4 100644 --- a/proto.js +++ b/proto.js @@ -80,7 +80,7 @@ Object.defineProperties(Array.prototype, { }, uniq: { value: function() { - return this.filter((e, i) => this.lastIndexOf(e) == i) + return this.filter((e, i) => this.indexOf(e) == i) } }, pushUniq: { @@ -116,7 +116,7 @@ Object.defineProperty(Array.prototype, "pt", { Object.defineProperties(PointArray.prototype, { sort: { value: function(func = (a, b) => a.readingOrderCompare(b)) { - return this.sort(func) + return Array.prototype.sort.apply(this, func) } }, includes: { @@ -146,7 +146,7 @@ Object.defineProperties(PointArray.prototype, { }, uniq: { value: function() { - return this.filter((e, i) => this.pt.lastIndexOf(e) == i) + return this.filter((e, i) => this.pt.indexOf(e) == i) } }, pushUniq: {