Skip to content

Commit 6937df9

Browse files
committed
Fix associating context objects with extended contexts
1 parent ba2704e commit 6937df9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/admin/src/DitoContext.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ function toObject(context) {
3232
if (object) break
3333
raw = Object.getPrototypeOf(raw)
3434
} while (raw)
35-
if (raw !== rawStart) {
35+
if (object && raw !== rawStart) {
3636
// Assign the passed context with the original object as well, so we don't
3737
// have to search for it again:
38-
contexts.set(rawStart, object)
38+
contexts.set(raw, object)
3939
}
4040
return object
4141
}

0 commit comments

Comments
 (0)