Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix: undefined
deoptimizePath
when the first element is empty str…
…ing (#4070) * 🐛 fix: undefined `deoptimizePath` when the first element is empty string * Add test Co-authored-by: Lukas Taegert-Atkinson <lukas.taegert-atkinson@tngtech.com> Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
- Loading branch information
1 parent
c40d206
commit 3acd536
Showing
4 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
test/function/samples/deoptimize-missing-namespace-members/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const assert = require('assert'); | ||
|
||
module.exports = { | ||
description: 'handles deoptimization of non-existing namespace members', | ||
exports(exports) { | ||
assert.strictEqual(exports.bar, undefined); | ||
} | ||
}; |
4 changes: 4 additions & 0 deletions
4
test/function/samples/deoptimize-missing-namespace-members/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import * as ns from './other.js'; | ||
|
||
const foo = 'foo'; | ||
export const bar = ns[foo]; |
Empty file.