Skip to content

Commit

Permalink
Merge pull request #392 from CodinGame/fix-color-picker
Browse files Browse the repository at this point in the history
Fix color picker
  • Loading branch information
CGNonofr authored Apr 12, 2024
2 parents f99dbf7 + 4b76836 commit 89bd0cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rollup/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ const PURE_FUNCTIONS = new Set([
'negate'
])

const SIDE_EFFECT_CONSTRUCTORS = new Set([
'DomListener'
])

const PURE_OR_TO_REMOVE_FUNCTIONS = new Set([
...PURE_FUNCTIONS
])
Expand Down Expand Up @@ -208,7 +212,7 @@ function transformVSCodeCode (id: string, code: string) {
},
visitNewExpression (path) {
const node = path.node
if (node.callee.type === 'Identifier') {
if (node.callee.type === 'Identifier' && !SIDE_EFFECT_CONSTRUCTORS.has(node.callee.name)) {
path.replace(addComment(node))
}
this.traverse(path)
Expand Down

1 comment on commit 89bd0cb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.