aboutsummaryrefslogtreecommitdiff
path: root/integration/snippets/optional-chain-with-function.js
diff options
context:
space:
mode:
Diffstat (limited to 'integration/snippets/optional-chain-with-function.js')
-rw-r--r--integration/snippets/optional-chain-with-function.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/integration/snippets/optional-chain-with-function.js b/integration/snippets/optional-chain-with-function.js
new file mode 100644
index 000000000..82ad51d46
--- /dev/null
+++ b/integration/snippets/optional-chain-with-function.js
@@ -0,0 +1,15 @@
+export function test() {
+ try {
+ const multipleSecondaryValues = undefined;
+ const ratings = ["123"];
+
+ var bar = multipleSecondaryValues?.map((value) => false);
+ bar = bar?.multipleSecondaryValues?.map((value) => false);
+ bar = bar?.bar?.multipleSecondaryValues?.map((value) => false);
+ bar = {}?.bar?.multipleSecondaryValues?.map((value) => false);
+ } catch (e) {
+ throw e;
+ }
+
+ return testDone(import.meta.url);
+}