Skip to content

Commit 9063c7f

Browse files
committed
add additional check to cover when no node arguments exist
1 parent 6e58947 commit 9063c7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

polaris-migrator/src/migrations/replace-sass-z-index/replace-sass-z-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const plugin = (options: PluginOptions = {}): Plugin => {
7272
containsSecondArgument = true;
7373
node.value = 'map-get';
7474
} else {
75-
const element = node.nodes[0].value ?? '';
75+
const element = node.nodes[0]?.value ?? '';
7676
if (!isValidElement(element)) return;
7777
const zIndexCustomProperty = zIndexMap[element];
7878

0 commit comments

Comments
 (0)