question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"undefined" error when assigning to property frozen on proto

See original GitHub issue

it is throwing undefined rather than something sensible

function

r = require('ses').makeSESRootRealm()
b = r.evaluate(`function a () {};a.bind = 1`)
// => Thrown: undefined

class

r = require('ses').makeSESRootRealm()
b = r.evaluate(`class a {};a.bind = 1`)
// => Thrown: undefined

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kumaviscommented, Aug 13, 2019

The fact that it is throwing undefined rather than something sensible is a distinct SES shim bug.

just want to clarify, this is the intended focus of this issue

1reaction
bmeckcommented, Aug 12, 2019

I’m neutral on the list of things that get patched, but i agree that having at least an option to enable this would be great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript prototype method "Cannot set property"
The prototype property exists on functions, not on instantiated objects. var Person = new Object(); console.log(Person.prototype); // undefined var Person2 ...
Read more >
Object.prototype.__proto__ - JavaScript - MDN Web Docs
A property access for __proto__ that eventually consults Object.prototype will find this property, but an access that does not consult Object.
Read more >
How can I detect an undefined object property in JavaScript?
This, in turn, makes them prone to silent errors, shall you misspell the property altogether. const obj = { prop : undefined };...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
The TypeError: Cannot read property of undefined is one of the most common type errors in JavaScript. It occurs when a property is...
Read more >
Object.defineProperty() - Javascript - CodeProject Reference
The function will receive as only argument the new value being assigned to the property. Defaults to undefined . Bear in mind that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found