Skip to content

Commit

Permalink
fix: fix crash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
awehook committed Oct 15, 2019
1 parent 54b86d6 commit f1e7c1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/component/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export class Toolbar extends React.Component {
};

items = [
{
icon: "newfile",
label: "new file"
// opType: OpType.REDO
},
// {
// icon: "newfile",
// label: "new file"
// // opType: OpType.REDO
// },
{
icon: "openfile",
label: "open file",
Expand Down
2 changes: 1 addition & 1 deletion src/component/ToolbarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import cx from "classnames";
export const ToolbarItem = ({diagramState, onChange,config,op})=>{
const onClick = () => {
if (config.opType) {
this.props.op(config.opType, null);
op(config.opType, null);
} else if (config.clickHandler) {
config.clickHandler(diagramState, onChange);
}
Expand Down

0 comments on commit f1e7c1e

Please sign in to comment.