mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] reactivity: toRaw now works with non reactive objects
This commit is contained in:
committed by
Samuel Degueldre
parent
bb9d65e95b
commit
12b8ce963e
+1
-1
@@ -57,7 +57,7 @@ export function markRaw<T extends Target>(value: T): NonReactive<T> {
|
||||
* @returns the underlying value
|
||||
*/
|
||||
export function toRaw<T extends object>(value: Reactive<T>): T {
|
||||
return value[TARGET];
|
||||
return value[TARGET] || value;
|
||||
}
|
||||
|
||||
const targetToKeysToCallbacks = new WeakMap<Target, Map<ObjectKey, Set<Callback>>>();
|
||||
|
||||
Reference in New Issue
Block a user