Skip to content

Commit 80bf81c

Browse files
committed
[js] Fix !DELEGATE_ACCEPTS returning a native int after refactor
1 parent bd83ef5 commit 80bf81c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vm/js/nqp-runtime/unicode-props.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ const bidiClassData = ucd.propTrie('BidiClass');
109109
const numericValueData = ucd.propTrie('NumericValue');
110110

111111
function delegateAccepts(shouldMatch, ctx, cursor, obj, code, value) {
112-
const result = cursor['!DELEGATE_ACCEPTS'](ctx, null, cursor, obj, new NativeStrArg(value)).$$getInt();
112+
const resultMaybeBoxed = cursor['!DELEGATE_ACCEPTS'](ctx, null, cursor, obj, new NativeStrArg(value));
113+
const result = typeof resultMaybeBoxed == 'number' ? resultMaybeBoxed : resultMaybeBoxed.$$getInt();
113114
if (result === (shouldMatch ? 0 : 1)) {
114115
return -1;
115116
} else {

0 commit comments

Comments
 (0)