mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] reactivity: don't subscribe to keys when making reactive
When attempting to create a reactive object, we first check if the target can be made reactive, this is done with Object.toString, which internally reads the Symbol.toStringTag on the underlying object. When trying to make a reactive object from another, for example when reobserving a reactive or when reading a reactive object from the context of another, this would read the subscribe the original object to the Symbol.toStringTag property. This commit fixes that by calling Object.toString on the underlying target object where applicable.
This commit is contained in:
committed by
Géry Debongnie
parent
203ac7ac66
commit
39329f80b2
@@ -28,7 +28,7 @@ const COLLECTION_RAWTYPES = new Set(["Set", "Map", "WeakMap"]);
|
||||
* @returns the raw type of the object
|
||||
*/
|
||||
function rawType(obj: any) {
|
||||
return objectToString.call(obj).slice(8, -1);
|
||||
return objectToString.call(toRaw(obj)).slice(8, -1);
|
||||
}
|
||||
/**
|
||||
* Checks whether a given value can be made into a reactive object.
|
||||
|
||||
Reference in New Issue
Block a user