Browse Source

Squelch interpolation errors at startup

Jakob Borg 11 years ago
parent
commit
8bba82a08d
2 changed files with 4 additions and 1 deletions
  1. 3 0
      gui/app.js
  2. 1 1
      gui/index.html

+ 3 - 0
gui/app.js

@@ -233,6 +233,9 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
     };
 
     $scope.nodeName = function (nodeCfg) {
+        if (typeof nodeCfg === 'undefined') {
+            return "";
+        }
         if (nodeCfg.Name) {
             return nodeCfg.Name;
         }

+ 1 - 1
gui/index.html

@@ -389,7 +389,7 @@
         <div class="well well-sm text-monospace text-center">
           {{myID | chunkID}}
         </div>
-        <img class="center-block img-thumbnail" src="qr/{{myID | chunkID}}"/>
+        <img ng-if="myID" class="center-block img-thumbnail" src="qr/{{myID | chunkID}}"/>
         </div>
         <div class="modal-footer">
           <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>&emsp;Close</button>