Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 2ae82fa

Browse files
Tried to serialize an unsupported type: javaObj.getClass().getName() #803
1 parent 05da88c commit 2ae82fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/firebase.android.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ firebase.toJsObject = javaObj => {
214214
return Boolean(!!(str === "True" || str === "true"));
215215
case 'java.lang.String':
216216
return String(javaObj);
217+
case 'java.lang.Integer':
217218
case 'java.lang.Long':
218219
case 'java.lang.Double':
219220
return Number(String(javaObj));
@@ -243,7 +244,7 @@ firebase.toJsObject = javaObj => {
243244
node[item.getKey()] = firebase.toJsObject(item.getValue());
244245
}
245246
} catch (e) {
246-
console.log("PLEASE REPORT THIS AT https://github.com/NativeScript/NativeScript/issues: Tried to serialize an unsupported type: javaObj.getClass().getName(), error: " + e);
247+
console.log("PLEASE REPORT THIS AT https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues: Tried to serialize an unsupported type: " + javaObj.getClass().getName() + ", error: " + e);
247248
}
248249
}
249250
return node;

0 commit comments

Comments
 (0)