summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/js/settings.js')
-rw-r--r--apps/files_external/js/settings.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 112676b8c27..30074ab179a 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -805,6 +805,13 @@ MountConfigListView.prototype = _.extend({
var mountPoint = storageConfig.mountPoint;
var backend = this._allBackends[storageConfig.backend];
+ if (!backend) {
+ backend = {
+ name: 'Unknown: ' + storageConfig.backend,
+ invalid: true
+ };
+ }
+
// FIXME: Replace with a proper Handlebar template
var $tr = this.$el.find('tr#addMountPoint');
this.$el.find('tbody').append($tr.clone());
@@ -829,6 +836,13 @@ MountConfigListView.prototype = _.extend({
$tr.addClass(backend.identifier);
$tr.find('.backend').data('identifier', backend.identifier);
+ if (backend.invalid) {
+ $tr.find('[name=mountPoint]').prop('disabled', true);
+ $tr.find('.applicable,.mountOptionsToggle').empty();
+ this.updateStatus($tr, false, 'Unknown backend: ' + backend.name);
+ return $tr;
+ }
+
var selectAuthMechanism = $('<select class="selectAuthMechanism"></select>');
var neededVisibility = (this._isPersonal) ? StorageConfig.Visibility.PERSONAL : StorageConfig.Visibility.ADMIN;
$.each(this._allAuthMechanisms, function(authIdentifier, authMechanism) {