How to use the reject function from when
Find comprehensive JavaScript when.reject code examples handpicked from public code repositorys.
GitHub: namgk/dnr-editor
51 52 53 54 55 56 57 58 59 60
try { storageModule = moduleSelector(runtime.settings); settingsAvailable = storageModule.hasOwnProperty("getSettings") && storageModule.hasOwnProperty("saveSettings"); sessionsAvailable = storageModule.hasOwnProperty("getSessions") && storageModule.hasOwnProperty("saveSessions"); } catch (e) { return when.reject(e); } if (!!storageModule.projects) { var projectsEnabled = false; if (runtime.settings.hasOwnProperty("editorTheme") && runtime.settings.editorTheme.hasOwnProperty("projects")) {
14
73
0
+ 4 other calls in file
GitHub: vektoririna/tasks
18 19 20 21 22 23 24 25 26 27 28
Importer000.prototype.importData = function (data) { return this.canImport(data) .then(function (importerFunc) { return importerFunc(data); }, function (reason) { return when.reject(reason); }); }; Importer000.prototype.canImport = function (data) {
0
0
0
+ 6 other calls in file