git » sdk » commit 7b82518

Return the cache if set

author Stephen Paul Weber
2025-10-17 19:28:14 UTC
committer Stephen Paul Weber
2025-10-17 19:28:14 UTC
parent 758e2972796e0313257f0f4adfe0528bf89e56a2

Return the cache if set

borogove/Stanza.hx +2 -0

diff --git a/borogove/Stanza.hx b/borogove/Stanza.hx
index 52bc9c6..d5bc49a 100644
--- a/borogove/Stanza.hx
+++ b/borogove/Stanza.hx
@@ -99,6 +99,8 @@ class Stanza implements NodeInterface {
 	};
 
 	public function serialize():String {
+		if (serialized != null) return serialized;
+
 		#if cpp
 		return (serialized = borogove.streams.XmppStropheStream.serializeStanza(this));
 		#elseif js