check for whitespaces in foldername

pull/998/head
lianahus 4 years ago committed by Liana Husikyan
parent 1569fc92e1
commit 2dfe98e1d0
  1. 3
      apps/remix-ide/src/app/tabs/testTab/testTab.js

@ -14,6 +14,9 @@ class TestTabLogic {
} }
generateTestFolder (path) { generateTestFolder (path) {
// Todo move this check to File Manager after refactoring
// Checking to ignore the value which contains only whitespaces
if (!path || !(/\S/.test(path))) return
const fileProvider = this.fileManager.fileProviderOf(path.split('/')[0]) const fileProvider = this.fileManager.fileProviderOf(path.split('/')[0])
fileProvider.exists(path, (e, res) => { if (!res) fileProvider.createDir(path) }) fileProvider.exists(path, (e, res) => { if (!res) fileProvider.createDir(path) })
} }

Loading…
Cancel
Save