Skip to content

Commit

Permalink
[js] Fix nqp::can with WrappedJSObject
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Oct 17, 2018
1 parent 4b8d6aa commit ab95411
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vm/js/nqp-runtime/reprs.js
Expand Up @@ -2500,7 +2500,16 @@ class WrappedJSObject extends REPR {

return ObjConstructor;
}

setupSTable(STable) {
STable.addInternalMethods(class {
$$can(ctx, name) {
return typeof this.$$jsObject[name] === 'function';
}
});
}
}

reprs.WrappedJSObject = WrappedJSObject;

let ID = 0;
Expand Down

0 comments on commit ab95411

Please sign in to comment.