Skip to content

Commit

Permalink
Fix associating context objects with extended contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
lehni committed Oct 10, 2024
1 parent ba2704e commit 6937df9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/admin/src/DitoContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ function toObject(context) {
if (object) break
raw = Object.getPrototypeOf(raw)
} while (raw)
if (raw !== rawStart) {
if (object && raw !== rawStart) {
// Assign the passed context with the original object as well, so we don't
// have to search for it again:
contexts.set(rawStart, object)
contexts.set(raw, object)
}
return object
}
Expand Down

0 comments on commit 6937df9

Please sign in to comment.