Skip to content

Commit c707437

Browse files
committed
refactor: ♻️ inverted booleans in is_valid()
to make it more intuitive
1 parent 3bf2234 commit c707437

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

addons/mod_loader/classes/mod_config.gd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ func validate() -> String:
5959

6060
# Runs the JSON-Schema validation and returns true if valid
6161
func is_valid() -> bool:
62-
if not validate() == "":
63-
is_valid = false
64-
return false
62+
if validate() == "":
63+
is_valid = true
64+
return true
6565

66-
is_valid = true
67-
return true
66+
is_valid = false
67+
return false
6868

6969

7070
# Saves the config data to disc

0 commit comments

Comments
 (0)