summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-05-18 10:09:48 -0400
committercjihrig <cjihrig@gmail.com>2019-05-20 10:26:23 -0400
commit873c372e6772d7378531d6afc8cad8bd513bdc58 (patch)
tree7536a8840b6b0785a78336e70d3aad6b473f6b8e /lib
parent1b381d630a3a595405c00892c58335369a368915 (diff)
downloadandroid-node-v8-873c372e6772d7378531d6afc8cad8bd513bdc58.tar.gz
android-node-v8-873c372e6772d7378531d6afc8cad8bd513bdc58.tar.bz2
android-node-v8-873c372e6772d7378531d6afc8cad8bd513bdc58.zip
esm: use correct error arguments
ERR_UNKNOWN_FILE_EXTENSION expects a single argument. This commit fixes the argument count. PR-URL: https://github.com/nodejs/node/pull/27763 Fixes: https://github.com/nodejs/node/issues/27761 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/modules/esm/default_resolve.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/internal/modules/esm/default_resolve.js b/lib/internal/modules/esm/default_resolve.js
index 67b8db716c..88377689ce 100644
--- a/lib/internal/modules/esm/default_resolve.js
+++ b/lib/internal/modules/esm/default_resolve.js
@@ -91,8 +91,7 @@ function resolve(specifier, parentURL) {
if (isMain)
format = type === TYPE_MODULE ? 'module' : 'commonjs';
else
- throw new ERR_UNKNOWN_FILE_EXTENSION(fileURLToPath(url),
- fileURLToPath(parentURL));
+ throw new ERR_UNKNOWN_FILE_EXTENSION(fileURLToPath(url));
}
return { url: `${url}`, format };
}