Skip to content

Commit

Permalink
[bug] Fix typescript lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
YaoKaiLun committed Feb 16, 2020
1 parent 4c5c7ee commit 706cb2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/components/Palette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ export default function Palette(props: PaletteProps) {
&& (!currentPlugin || !currentPlugin.shapeName || name !== currentPlugin.shapeName)) {
(function(event: any) {
setTimeout(() => {
if (plugins[i].onClick) {
plugins[i].onClick(getDrawEventPramas(event))
}
plugins[i].onClick && plugins[i].onClick!(getDrawEventPramas(event))
})
})(e)
props.handlePluginChange(plugins[i])
Expand Down
4 changes: 1 addition & 3 deletions src/plugins/repeal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export default {
setTimeout(() => {
for (let i = 0; i < plugins.length; i++) {
if (plugins[i].shapeName && plugins[i].shapeName === recreatedNode.name()) {
if (plugins[i].onNodeRecreate) {
plugins[i].onNodeRecreate(drawEventPramas, recreatedNode)
}
plugins[i].onNodeRecreate && plugins[i].onNodeRecreate!(drawEventPramas, recreatedNode)
break
}
}
Expand Down

0 comments on commit 706cb2f

Please sign in to comment.