Skip to content

Commit

Permalink
@unovis/svelte | XY Container: Better name for a boolean variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rokotyan committed Jan 3, 2023
1 parent 3034f39 commit 0aacbac
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
setContext<Lifecycle>('container', (_, c: XYComponentCore<Datum> | Tooltip) => {
const key = getConfigKey(c)
if (key && key in config) {
const coreComponent = key === 'components'
config[key] = coreComponent ? [...config.components, c] : c
const isCoreComponent = key === 'components'
config[key] = isCoreComponent ? [...config.components, c] : c
return {
destroy: () => {
config[key] = coreComponent ? config.components.filter(comp => comp !== c) : undefined
config[key] = isCoreComponent ? config.components.filter(comp => comp !== c) : undefined
},
}
}
Expand Down

0 comments on commit 0aacbac

Please sign in to comment.