aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java b/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java
index 7dd68b3..32c688c 100644
--- a/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java
+++ b/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java
@@ -193,7 +193,8 @@ public class GsonConfigInstance<T> extends ConfigInstance<T> {
* @param gsonBuilder the function to apply to the builder
*/
public Builder<T> appendGsonBuilder(UnaryOperator<GsonBuilder> gsonBuilder) {
- this.gsonBuilder = builder -> gsonBuilder.apply(this.gsonBuilder.apply(builder));
+ UnaryOperator<GsonBuilder> prev = this.gsonBuilder;
+ this.gsonBuilder = builder -> gsonBuilder.apply(prev.apply(builder));
return this;
}