diff --git a/wasm/dm.go b/wasm/dm.go
index 249f59e95c8f68b4e0d457d97a560faf3442f6a1..71a106a4c91a7d8cd6c9374369ede1d110bfd2e3 100644
--- a/wasm/dm.go
+++ b/wasm/dm.go
@@ -262,7 +262,7 @@ func (dmc *DMClient) GetID(js.Value, []js.Value) any {
 // Returns:
 //   - Public key (Uint8Array).
 func (dmc *DMClient) GetPublicKey(js.Value, []js.Value) any {
-	return dmc.api.GetPublicKey()
+	return utils.CopyBytesToJS(dmc.api.GetPublicKey())
 }
 
 // GetToken returns the DM token of this client.