diff --git a/src/components/shortcuts-settings.jsx b/src/components/shortcuts-settings.jsx
index ad8aca576..de31c3348 100644
--- a/src/components/shortcuts-settings.jsx
+++ b/src/components/shortcuts-settings.jsx
@@ -1055,16 +1055,16 @@ function ImportExport({ shortcuts, onClose }) {
const { note = '' } = relationship;
// const newNote = `${note}\n\n\n${shortcutsStr}`;
let newNote = '';
+ const settingsJSON = JSON.stringify({
+ v: '1', // version
+ dt: Date.now(), // datetime stamp
+ data: shortcutsStr, // shortcuts settings string
+ });
if (
/(.*)<\/phanpy-shortcuts-settings>/.test(
note,
)
) {
- const settingsJSON = JSON.stringify({
- v: '1', // version
- dt: Date.now(), // datetime stamp
- data: shortcutsStr, // shortcuts settings string
- });
newNote = note.replace(
/(.*)<\/phanpy-shortcuts-settings>/,
`${settingsJSON}`,