Skip to content

Commit 6e89034

Browse files
authored
Buh
1 parent 695a8f6 commit 6e89034

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/extensions/jwPointer/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ class PointerType {
3636
}
3737

3838
static toPointer(x) {
39+
console.debug(x)
3940
if (x instanceof PointerType) return x;
41+
42+
let num = Cast.toNumber(x);
43+
if (num <= pointerLimit) return new PointerType(num);
44+
4045
return new PointerType(0);
4146
}
4247

@@ -74,7 +79,7 @@ class PointerType {
7479
}
7580

7681
toString() {
77-
return Cast.toString(this.pointerID)
82+
return this.pointerID.toString();
7883
}
7984

8085
toReporterContent() {

0 commit comments

Comments
 (0)