diff options
author | 2022-05-11 02:57:51 -0700 | |
---|---|---|
committer | 2022-05-11 02:57:51 -0700 | |
commit | 7d1eced8c6d76a64f505b20473ba65d4c80e10cc (patch) | |
tree | a2d40e15ce0f7096404658c73a58e0b51ea51237 /src/javascript | |
parent | 123267685f57968e3515841a8c2d6991c44dcfa8 (diff) | |
download | bun-7d1eced8c6d76a64f505b20473ba65d4c80e10cc.tar.gz bun-7d1eced8c6d76a64f505b20473ba65d4c80e10cc.tar.zst bun-7d1eced8c6d76a64f505b20473ba65d4c80e10cc.zip |
[bun.js] eagerly convert to import.meta.require
Diffstat (limited to 'src/javascript')
-rw-r--r-- | src/javascript/jsc/bindings/ZigGlobalObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/javascript/jsc/bindings/ZigGlobalObject.cpp b/src/javascript/jsc/bindings/ZigGlobalObject.cpp index a3c84bcfc..45f4533c2 100644 --- a/src/javascript/jsc/bindings/ZigGlobalObject.cpp +++ b/src/javascript/jsc/bindings/ZigGlobalObject.cpp @@ -1173,7 +1173,7 @@ JSC::JSObject* GlobalObject::moduleLoaderCreateImportMetaProperties(JSGlobalObje auto index = view.reverseFind('/', view.length()); if (index != WTF::notFound) { metaProperties->putDirect(vm, clientData->builtinNames().dirPublicName(), - JSC::jsSubstring(globalObject, keyString, 0, index + 1)); + JSC::jsSubstring(globalObject, keyString, 0, index)); metaProperties->putDirect( vm, clientData->builtinNames().filePublicName(), JSC::jsSubstring(globalObject, keyString, index + 1, keyString->length() - index - 1)); |