Skip to content

Commit

Permalink
Make sure the application isn't saved during mounting (#779)
Browse files Browse the repository at this point in the history
* Make sure the DOM isn't saved when mounting

* don't rename
  • Loading branch information
Janpot authored Aug 12, 2022
1 parent 3ffcae8 commit a1794f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/toolpad-app/src/toolpad/DomLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export default function DomProvider({ appId, children }: DomContextProps) {
});
const api = React.useMemo(() => createDomApi(dispatch), []);

const lastSavedDom = React.useRef<appDom.AppDom | null>(null);
const lastSavedDom = React.useRef<appDom.AppDom | null>(state.dom);
const handleSave = React.useCallback(() => {
if (!state.dom || lastSavedDom.current === state.dom) {
return;
Expand Down

0 comments on commit a1794f5

Please sign in to comment.