Skip to content

Commit

Permalink
Make onImportXmlError nullable (the code already allows this, we just…
Browse files Browse the repository at this point in the history
… didn't make it nullable in the type signature)
  • Loading branch information
nbudin committed Feb 24, 2023
1 parent 19ece29 commit a51bbc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useBlocklyWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {UseBlocklyProps} from "./BlocklyWorkspaceProps";

import debounce from "./debounce";

function importFromXml(xml: string, workspace: Workspace, onImportXmlError: (error: any) => void) {
function importFromXml(xml: string, workspace: Workspace, onImportXmlError?: (error: any) => void) {
try {
Blockly.Xml.domToWorkspace(Blockly.Xml.textToDom(xml), workspace);
return true;
Expand Down

0 comments on commit a51bbc3

Please sign in to comment.