Skip to content

Commit f3fa524

Browse files
Update polaris-migrator/src/migrations/replace-sass-z-index/replace-sass-z-index.ts
Remove unnecessary nodes check in hasMoreThanOneArgument Co-authored-by: Aaron Casanova <[email protected]>
1 parent 9063c7f commit f3fa524

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ const isValidElement = (
3131
return Object.keys(zIndexMap).includes(element as string);
3232
};
3333

34-
const hasMoreThanOneArgument = (node: FunctionNode) => {
35-
if (!node.nodes || !Array.isArray(node.nodes)) return false;
36-
return node.nodes && node.nodes.length > 1;
37-
};
34+
const hasMoreThanOneArgument = (node: FunctionNode) => node.nodes.length > 1;
3835

3936
const plugin = (options: PluginOptions = {}): Plugin => {
4037
const namespace = options?.namespace || '';

0 commit comments

Comments
 (0)