node-gtk icon indicating copy to clipboard operation
node-gtk copied to clipboard

node 14: Object.prototype.toString doesn't use constructor name

Open romgrk opened this issue 5 years ago • 0 comments

const attr = new Pango.AttrSize(10)
console.log(attr.toString())
// in node 12: [object AttrSize]
// in node 14: [object Object]

Not sure what is the cause of this change. We could preserve the old behavior by adding this to all our boxeds:

AttrSize.prototype[Symbol.toStringTag] = 'AttrSize'

romgrk avatar Aug 26 '20 19:08 romgrk