Răsfoiți Sursa

HUE-5193 [assist] Don't show an error in case the collection size is zero

Enrico Berti 9 ani în urmă
părinte
comite
087179d
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/apiHelper.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/apiHelper.js

@@ -363,7 +363,7 @@ var ApiHelper = (function () {
         url: url,
         timeout: options.timeout,
         success: function (data) {
-          if (!data.error && !self.successResponseIsError(data) && typeof data.collections !== 'undefined' && data.collections.length) {
+          if (!data.error && !self.successResponseIsError(data) && typeof data.collections !== 'undefined' && data.collections !== null) {
             storeInCache(data);
             options.successCallback(data);
           } else {