Преглед на файлове

luci-app-ssr-plus: Fix when `SOCKS5` is global server node cannot disabled issue.

zxlhhyccc преди 8 месеца
родител
ревизия
9d0589a97c
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua

+ 3 - 3
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua

@@ -169,15 +169,15 @@ o.rmempty = false
 o.cfgvalue = function(self, section)
     local enabled = m:get(section, "enabled")
     if enabled == "0" then
-        return m:get(section, "old_server") or "same"
+        return m:get(section, "old_server")
     end
-    return Value.cfgvalue(self, section) or "same" -- Default to `same` when enabled
+    return Value.cfgvalue(self, section) -- Default to `same` when enabled
 end
 
 o.write = function(self, section, value)
     local enabled = m:get(section, "enabled")
     if enabled == "0" then
-        local old_server = Value.cfgvalue(self, section) or "same"
+        local old_server = Value.cfgvalue(self, section)
         if old_server ~= "nil" then
             m:set(section, "old_server", old_server)
         end