Skip to content

Commit

Permalink
Fix usage of libGD.js in Node
Browse files Browse the repository at this point in the history
  • Loading branch information
4ian committed Sep 30, 2024
1 parent 78c3140 commit fe743bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GDevelop.js/Bindings/ObjectJsImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void ObjectJsImplementation::DoSerializeTo(SerializerElement& element) const {
if (!self.content)
throw '`content` is not defined on a ObjectJsImplementation.';

var serializerElement = gd.Serializer.fromJSObject(self.content);
var serializerElement = Module['Serializer'].fromJSObject(self.content);
return getPointer(serializerElement);
},
(int)this);
Expand All @@ -157,7 +157,7 @@ void ObjectJsImplementation::DoUnserializeFrom(Project& project,
}

// JSON.parse + toJSON is 30% faster than gd.Serializer.toJSObject.
self.content = JSON.parse(gd.Serializer.toJSON(serializerElement));
self.content = JSON.parse(Module['Serializer'].toJSON(serializerElement));
},
(int)this,
(int)&element.GetChild("content"));
Expand Down

0 comments on commit fe743bb

Please sign in to comment.