Skip to content

Commit a6a69f4

Browse files
committed
bug update
1 parent 3a67e53 commit a6a69f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/fr/medialo/api/pbmyaml/PbmYaml.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,12 @@ public List<?> getListOrDefault(String url, List<?> def) {
268268

269269
public <T> T getTypeOrDefaultAndSetSave(String url, T def) {
270270
Object bool = urlToObj(url);
271-
if (bool != null) {
271+
if (bool == null) {
272272
set(url, def);
273273
save();
274-
return (T) bool;
275-
} else {
276274
return def;
275+
} else {
276+
return (T) urlToObj(url);
277277
}
278278
}
279279

0 commit comments

Comments
 (0)