Kaynağa Gözat

fix 修复 isLogin 方法抛异常无法正常返回值问题

疯狂的狮子Li 4 ay önce
ebeveyn
işleme
113da3437b

+ 5 - 1
ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java

@@ -192,7 +192,11 @@ public class LoginHelper {
      * @return 结果
      */
     public static boolean isLogin() {
-        return getLoginUser() != null;
+        try {
+            return getLoginUser() != null;
+        } catch (Exception e) {
+            return false;
+        }
     }
 
 }