Log error in a promise catch block

GitOrigin-RevId: 09756d52bd6351c55051a74f22f38c450af9a275
This commit is contained in:
M Fahru 2023-01-06 18:52:30 -07:00 committed by Copybot
parent 7475237170
commit 94ab78b427
2 changed files with 3 additions and 3 deletions

View file

@ -12,14 +12,14 @@ export default function useProjectWideSettings() {
const setCompiler = useCallback(
(newCompiler: ProjectSettings['compiler']) => {
saveProjectSettings('compiler', newCompiler)
saveProjectSettings('compiler', newCompiler).catch(console.error)
},
[saveProjectSettings]
)
const setImageName = useCallback(
(newImageName: ProjectSettings['imageName']) => {
saveProjectSettings('imageName', newImageName)
saveProjectSettings('imageName', newImageName).catch(console.error)
},
[saveProjectSettings]
)

View file

@ -50,7 +50,7 @@ export function saveUserSettings(
body: {
[key]: value,
},
})
}).catch(console.error)
}
export const saveProjectSettings = async (