Skip to content

Commit

Permalink
[js] Fixup some stuff eslint complains about
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jun 15, 2017
1 parent 37b50d7 commit 5ebb431
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/vm/js/nqp-runtime/core.js
Expand Up @@ -624,15 +624,15 @@ op.decode = function(buf, encoding) {

op.objprimspec = function(obj) {
if (obj === Null) return 0;
if (typeof obj === "object") {
if (typeof obj === 'object') {
if (obj instanceof NQPInt) {
return 1;
} else {
return (obj._STable && obj._STable.REPR.boxedPrimitive ? obj._STable.REPR.boxedPrimitive : 0);
}
} else if (typeof obj == "number") {
} else if (typeof obj == 'number') {
return 2;
} else if (typeof obj == "string") {
} else if (typeof obj == 'string') {
return 3;
} else {
throw new NQPException(`objprimspec can't handle things of type: ${typeof obj}`);
Expand Down
1 change: 0 additions & 1 deletion src/vm/js/nqp-runtime/runtime.js
Expand Up @@ -252,7 +252,6 @@ exports.toNum = function(arg_, ctx) {
} else if (arg.$$numify) {
return arg.$$numify();
} else {
//console.log(arg);
throw 'Can\'t convert to num';
}
};
Expand Down

0 comments on commit 5ebb431

Please sign in to comment.