Skip to content

Commit cbf2f6c

Browse files
committed
fix: refreshEditor after loadingDefaultSettings
1 parent b67a376 commit cbf2f6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/Settings.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ export default class Settings extends React.Component<
5757
};
5858

5959
loadDefaultSettings = () => {
60-
this.props.loadDefaultSettings(this.props.saveSettings);
60+
const callback = () => {
61+
/** Refresh the editor and save settings after loading default */
62+
this.props.refreshEditor();
63+
this.props.saveSettings();
64+
};
65+
this.props.loadDefaultSettings(callback);
6166
};
6267

6368
render() {

0 commit comments

Comments
 (0)