1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Improved error messaging

Instead of a standard `console.log` I've added an alert. Pressing the button and getting nowhere is not good from a user perspective.
This commit is contained in:
Mike Resoli
2016-10-20 16:50:47 +01:00
committed by GitHub
parent 7bb63a78c5
commit 9b68b1d327

View File

@@ -71,10 +71,10 @@ class TopBar extends React.Component {
break
}
}
if (storage == null) throw new Error('No storage to create a note')
if (storage == null) alert('No storage to create a note')
let folder = _.find(storage.folders, {key: params.folderKey})
if (folder == null) folder = storage.folders[0]
if (folder == null) throw new Error('No folder to create a note')
if (folder == null) alert('No folder to create a note')
return {
storage,