Closed katelynsills closed 3 years ago
hmm - how could the object be frozen? it's a function created inside that file (not the one that gets shimmed to Object
, either). What version of object.assign
do you have installed?
Enzyme seems to be using define-properties v1.1.3
and object.assign v4.1.0
.
Object.assign
is frozen by SES before this code runs. If I change the define-properties code to include a console.log, I get the following:
var defineProperty = function (object, name, value, predicate) {
console.log('is object frozen', Object.isFrozen(object), object);
is object frozen true [Function: assign] Function <Function <[Object: null prototype] {}>>
is object frozen true [Function: assign] Function <Function <[Object: null prototype] {}>>
is object frozen true [Function: assign] Function <Function <[Object: null prototype] {}>>
is object frozen true [Function: assign] Function <Function <[Object: null prototype] {}>>
is object frozen true [Function: assign] Function <Function <[Object: null prototype] {}>>
is object frozen true [Function: assign] Function <Function <[Object: null prototype] {}>>
Ah, that bug was fixed in https://github.com/ljharb/object.assign/commit/fc41c80451738e91c4126075aafd12ebb3e0c25e, which is available in v4.1.1 and higher :-) feel free to update!
Ah, that bug was fixed in https://github.com/ljharb/object.assign/commit/fc41c80451738e91c4126075aafd12ebb3e0c25e, which is available in v4.1.1 and higher :-) feel free to update!
Great! Thank you!
Hi @ljharb, I'm trying to use Enzyme under
SES
, and I'm running into an issue that involves theobject.assign
package anddefine-properties
package, although it may be solved by something lower down in the dependency tree.Here's what I'm seeing:
It seems like the most obvious solution is to change define-property to return early if the object is frozen, but I'm not sure this is the right approach.
Thanks!