this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #610 from fhemberger/patch-1

fix(shortcuts-settings): `settingsJSON` must be defined if note doesn't exist

authored by

Chee Aun and committed by
GitHub
4937c5f7 818f58b4

+5 -5
+5 -5
src/components/shortcuts-settings.jsx
··· 1055 1055 const { note = '' } = relationship; 1056 1056 // const newNote = `${note}\n\n\n$<phanpy-shortcuts-settings>{shortcutsStr}</phanpy-shortcuts-settings>`; 1057 1057 let newNote = ''; 1058 + const settingsJSON = JSON.stringify({ 1059 + v: '1', // version 1060 + dt: Date.now(), // datetime stamp 1061 + data: shortcutsStr, // shortcuts settings string 1062 + }); 1058 1063 if ( 1059 1064 /<phanpy-shortcuts-settings>(.*)<\/phanpy-shortcuts-settings>/.test( 1060 1065 note, 1061 1066 ) 1062 1067 ) { 1063 - const settingsJSON = JSON.stringify({ 1064 - v: '1', // version 1065 - dt: Date.now(), // datetime stamp 1066 - data: shortcutsStr, // shortcuts settings string 1067 - }); 1068 1068 newNote = note.replace( 1069 1069 /<phanpy-shortcuts-settings>(.*)<\/phanpy-shortcuts-settings>/, 1070 1070 `<phanpy-shortcuts-settings>${settingsJSON}</phanpy-shortcuts-settings>`,