1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

Preferenceからもフォルダーの色の選択ができる。

This commit is contained in:
Rokt33r
2015-11-16 01:22:22 +09:00
parent b28b18a19a
commit ff1bffbb55
4 changed files with 107 additions and 20 deletions

View File

@@ -47,7 +47,8 @@ function folders (state = initialFolders, action) {
if (!_.isString(folder.name)) throw new Error('Folder name must be a string')
folder.name = folder.name.trim().replace(/\s/, '_')
if (folder.length === 0) throw new Error('Folder name is required')
if (folder.name.length === 0) throw new Error('Folder name is required')
if (folder.name.match(/\//)) throw new Error('`/` is not available for folder name')
// Folder existence check
if (targetFolder == null) throw new Error('Folder doesnt exist')