Browse Source

重置兼容问题

MaiXinRong 4 năm trước cách đây
mục cha
commit
625d110b9f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      app/public/js/stage_im.js

+ 2 - 1
app/public/js/stage_im.js

@@ -261,9 +261,10 @@ const stageIm = (function () {
                 im.org[f] = im[f];
             }
         }
+        im.custom_define_exist = im.custom_define !== null;
         im.custom_define = detail.custom_define ? detail.custom_define.split(',') : [];
         _.assignInWith(im, detail, function (oV, sV, key) {
-            return im.custom_define.length > 0
+            return im.custom_define_exist
                 ? (im.custom_define.indexOf(key) > -1 ? sV : ((resetFields.indexOf(key) > -1) ? im.org[key] : oV))
                 : (imFields.indexOf(key) > -1 ? sV : ((resetFields.indexOf(key) > -1) ? im.org[key] : oV));
         });