CoPilot fail: telling me hasOwn “seems to be a typo or a custom method” and that I need to use hasOwnProperty except that’s not what the docs say.

Note: Object.hasOwn() is intended as a replacement for Object.prototype.hasOwnProperty()."