diff --git a/src/editor.tsx b/src/editor.tsx index 8226a51..ed5f884 100644 --- a/src/editor.tsx +++ b/src/editor.tsx @@ -65,8 +65,10 @@ export class EditorWrapper extends React.PureComponent { emitDataEvent = async (cb: (data: OutputData) => void) => { try { - const output = await this.editor.save(); - cb(output); + setTimeout(async () => { + const output = await this.editor.save(); + cb(output); + }, 50); } catch (error) { // tslint:disable-next-line: no-console console.error('Saving failed: ', error);