Some array.slice to array.startsWith and cleanup some JavaScript code

This commit is contained in:
the-djmaze 2022-10-26 16:38:39 +02:00
parent 3903a37b64
commit ffcc86805a
8 changed files with 83 additions and 146 deletions

View file

@ -34,7 +34,7 @@ export class FolderCreatePopupView extends AbstractViewPopup {
oItem =>
oItem ? (oItem.isSystemFolder() ? oItem.name() + ' ' + oItem.manageFolderSystemName() : oItem.name()) : '',
FolderUserStore.namespace
? item => FolderUserStore.namespace !== item.fullName.slice(0, FolderUserStore.namespace.length)
? item => !item.fullName.startsWith(FolderUserStore.namespace)
: null,
true
)