luci-base: network.js: fix inverted logic in registerErrorCode()
authorJo-Philipp Wich <jo@mein.io>
Fri, 16 Aug 2019 10:00:50 +0000 (12:00 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 16 Aug 2019 10:01:09 +0000 (12:01 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/network.js

index d6a97408a253706c81ff998454a9493d7af724d5..fb23fba857a24c77293df98445bbe2c0aae69712 100644 (file)
@@ -678,7 +678,7 @@ Network = L.Class.extend({
        registerErrorCode: function(code, message) {
                if (typeof(code) == 'string' &&
                    typeof(message) == 'string' &&
-                   proto_errors.hasOwnProperty(code)) {
+                   !proto_errors.hasOwnProperty(code)) {
                        proto_errors[code] = message;
                        return true;
                }