Update proto.js
This commit is contained in:
5
proto.js
5
proto.js
@@ -97,7 +97,10 @@ Object.defineProperties(Array.prototype, {
|
|||||||
|
|
||||||
class PointArray extends Array {
|
class PointArray extends Array {
|
||||||
static convert(arr) {
|
static convert(arr) {
|
||||||
arr.__proto__ = PointArray.prototype
|
if (!(arr instanceof PointArray)) {
|
||||||
|
arr.__proto__ = PointArray.prototype
|
||||||
|
}
|
||||||
|
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user