Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[js] Make nqp::objprimspec work on a null (return 0).
  • Loading branch information
pmurias committed Mar 9, 2016
1 parent 3949819 commit 1a9e0a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vm/js/nqp-runtime/core.js
Expand Up @@ -694,6 +694,7 @@ op.decode = function(buf, encoding_) {
};

op.objprimspec = function(obj) {
if (obj === null) return 0;
return (obj._STable && obj._STable.REPR.boxed_primitive ? obj._STable.REPR.boxed_primitive : 0);
};

Expand Down

0 comments on commit 1a9e0a7

Please sign in to comment.