From e4b2c30616a94bde61f0f0cb3940b9f60d79f6d4 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 5 Oct 2013 00:15:30 -0700 Subject: [PATCH] Don't use undefined name when saving indexer --- src/UI/Settings/Indexers/Model.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/UI/Settings/Indexers/Model.js b/src/UI/Settings/Indexers/Model.js index a0abfd704..ecfee73b8 100644 --- a/src/UI/Settings/Indexers/Model.js +++ b/src/UI/Settings/Indexers/Model.js @@ -8,8 +8,15 @@ define([ initialize: function () { var name = this.get('name'); - this.successMessage = 'Saved indexer: ' + name; - this.errorMessage = 'Couldn\'t save indexer: ' + name; + if (name) { + this.successMessage = 'Saved indexer: ' + name; + this.errorMessage = 'Couldn\'t save indexer: ' + name; + } + + else { + this.successMessage = 'Saved indexer'; + this.errorMessage = 'Couldn\'t save indexer'; + } this.baseInitialize.call(this); }