changeset 2089f4eda8cc in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=2089f4eda8cc
description:
        Do not request model notifications if they are already empty

        issue11411
        review388371002
diffstat:

 src/common.js |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 1a7b8019712f -r 2089f4eda8cc src/common.js
--- a/src/common.js     Tue Apr 19 18:06:14 2022 +0200
+++ b/src/common.js     Tue Apr 19 23:17:51 2022 +0200
@@ -555,7 +555,7 @@
 
     Sao.common.ModelNotification = Sao.class_(Object, {
         init: function() {
-            this._depends = {};
+            this._depends = null;
         },
         load_names: function() {
             this._depends = Sao.rpc({
@@ -564,7 +564,7 @@
             }, Sao.Session.current_session, false);
         },
         get: function(model) {
-            if (jQuery.isEmptyObject(this._depends)) {
+            if (!this._depends) {
                 this.load_names();
             }
             return this._depends[model] || [];

Reply via email to