浏览代码

fix(plugin): page crash when checking plugin updates with some network issues #5222

charlie 3 年之前
父节点
当前提交
2bd87d5d91
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/frontend/components/plugins.cljs

+ 2 - 2
src/main/frontend/components/plugins.cljs

@@ -248,7 +248,7 @@
          :on-click #(when-not has-other-pending?
                       (plugin-handler/check-or-update-marketplace-plugin
                         (assoc item :only-check (not new-version))
-                        (fn [e] (notification/show! e :error))))}
+                        (fn [^js e] (notification/show! (.toString e) :error))))}
 
         (if installing-or-updating?
           (t :plugin/updating)
@@ -780,7 +780,7 @@
              (if-let [n (state/get-next-selected-coming-update)]
                (plugin-handler/check-or-update-marketplace-plugin
                  (assoc n :only-check false)
-                 (fn [^js e] (notification/show! e :error)))
+                 (fn [^js e] (notification/show! (.toString e) :error)))
                (plugin-handler/close-updates-downloading)))
 
           :disabled