-
-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Labels
Description
Using tns-android@next ("version": "3.4.1-2018-02-22-01") and trying to print NativeScript View
arguments (or other circular JSON objects) via console.log
fails with
JS: ERROR Couldn't convert object to a JSON string: Uncaught TypeError: Converting circular structure to JSON
JS: ERROR CONTEXT Couldn't convert object to a JSON string: Uncaught TypeError: Converting circular structure to JSON
For example:
onStackLoaded(args: EventData) {
console.log("onStackLoaded");
console.log(args.object); // TypeError: Converting circular structure to JSON
console.log("" + args.object); // OK prints StackLayout(9)
console.log(JSON.stringify(args)); // JS: ERROR Couldn't convert object to a JSON string: Uncaught TypeError: Converting circular structure to JSON
console.log("" + JSON.stringify(args)); // JS: ERROR CONTEXT Couldn't convert object to a JSON string: Uncaught TypeError: Converting circular structure to JSON
}
Steps to reproduce:
- use the above code or this demo app with next
tns-android
.