Those proxies cannot be passed to String() without throwing the error:
TypeError: Cannot convert object to primitive value
There were a couple of places that potentially pass those proxies to String(). The first (line 134) could be removed and replaced by a typeof check. The second I have replaced with a toString() helper function that handles error cases more gracefully.
The stringify function also caused problems because it attempts to enumerate the component's properties, leading to a warning. I've tweaked that to avoid that warning.
I've also moved the call to the original log function higher up. This helps to ensure that it still happens, even if an unexpected error occurs in the other code.
Console logging currently fails when the logged value is a component instance proxy:
SFC Playground Example
Those proxies cannot be passed to
String()
without throwing the error:There were a couple of places that potentially pass those proxies to
String()
. The first (line 134) could be removed and replaced by atypeof
check. The second I have replaced with atoString()
helper function that handles error cases more gracefully.The
stringify
function also caused problems because it attempts to enumerate the component's properties, leading to a warning. I've tweaked that to avoid that warning.I've also moved the call to the original log function higher up. This helps to ensure that it still happens, even if an unexpected error occurs in the other code.