Browse Source

Merge pull request #841 from saghul/fix-node-loader

Fix non-source module loading in Node loader
revert-841-fix-node-loader
Sami Vaarala 9 years ago
committed by GitHub
parent
commit
211e7c07d3
  1. 2
      extras/module-node/duk_module_node.c

2
extras/module-node/duk_module_node.c

@ -130,7 +130,7 @@ static duk_ret_t duk__handle_require(duk_context *ctx) {
duk_throw(ctx); /* rethrow */ duk_throw(ctx); /* rethrow */
} }
} else if (duk_is_undefined(ctx, -1)) { } else if (duk_is_undefined(ctx, -1)) {
/* nop */ duk_pop(ctx);
} else { } else {
duk__del_cached_module(ctx, id); duk__del_cached_module(ctx, id);
duk_error(ctx, DUK_ERR_API_ERROR, "invalid module load callback return value"); duk_error(ctx, DUK_ERR_API_ERROR, "invalid module load callback return value");

Loading…
Cancel
Save