Skip to content

Commit

Permalink
chore(svg-tool): add optional chaining to svg carbon tool
Browse files Browse the repository at this point in the history
  • Loading branch information
annawen1 committed May 24, 2024
1 parent d716440 commit 68c077d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -35,7 +35,7 @@ const icon = (descriptor) => {
'...': '${spread(attrs)}', // eslint-disable-line no-template-curly-in-string
})
);
descriptor.content.unshift('${children}'); // eslint-disable-line no-template-curly-in-string
descriptor?.content?.unshift('${children}'); // eslint-disable-line no-template-curly-in-string
return `({ children, ...attrs } = {}) => svg\`${toString(descriptor)}\``;
};

Expand Down

0 comments on commit 68c077d

Please sign in to comment.