electron-log icon indicating copy to clipboard operation
electron-log copied to clipboard

Don't call toJSON automatically when serializing an object

Open megahertz opened this issue 2 years ago • 0 comments

Discussed in https://github.com/megahertz/electron-log/discussions/318

Originally posted by frifrafry September 2, 2022 I couldn't get electron-log working with electron-vue, as I was always running into: [Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.

In the end I solved this via setting up a simple default implementation: Vue.prototype.toJSON = function () { return 'toJSON not defined' } Any thoughts on this? Is there a better way to solve this?

megahertz avatar Sep 03 '22 14:09 megahertz