Skip to content

Commit

Permalink
Fixed typo while calculating module path length.
Browse files Browse the repository at this point in the history
The issue was introduced in 77c398f26d7e (not released yet).
  • Loading branch information
xeioex committed Apr 11, 2022
1 parent 222d6fd commit ab1702c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/njs_module.c
Expand Up @@ -118,7 +118,7 @@ njs_module_path(njs_vm_t *vm, const njs_str_t *dir, njs_module_info_t *info)
length = info->name.length;

if (dir != NULL) {
length = dir->length;
length += dir->length;

if (length == 0) {
return NJS_DECLINED;
Expand Down
9 changes: 9 additions & 0 deletions test/js/import_very_long_path.t.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ab1702c

Please sign in to comment.