From 24023ff9e8ad806e6509664ff1ef54e92481728e Mon Sep 17 00:00:00 2001 From: Benny Ng Date: Wed, 27 Jan 2016 22:41:39 +0800 Subject: [PATCH] Handle null case for invalid ng-model value (fixes #2392) Invalid ng-model value is assigned `null` by angular.js which is being matched as `object`, thus disappear in the UI when a minus sign is entered. --- AUTHORS | 1 + NICKS | 1 + gui/default/syncthing/core/syncthingController.js | 3 +++ 3 files changed, 5 insertions(+) diff --git a/AUTHORS b/AUTHORS index 904cde557..68d10b076 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,6 +13,7 @@ Bart De Vries Ben Curthoys Ben Schulz Ben Sidhom +Benny Ng Brandon Philips Brendan Long Brian R. Becker diff --git a/NICKS b/NICKS index 91354a5d8..06d73946d 100644 --- a/NICKS +++ b/NICKS @@ -72,6 +72,7 @@ Stefan-Code timabell tnn2 tojrobinson +tpng tylerbrazier uok veeti diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index eabd4c37a..28fc7aa6d 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1531,6 +1531,9 @@ angular.module('syncthing.core') if (key.substr(0, 1) === '_') { return 'skip'; } + if (value === null) { + return 'null'; + } if (typeof value === 'number') { return 'number'; }