mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] store: prevent crash when selector returns null
Because `typeof null === 'object'`.
This commit is contained in:
committed by
Géry Debongnie
parent
c8d9c0b50e
commit
bc2c7edff4
+1
-1
@@ -132,7 +132,7 @@ export function useStore(selector, options: SelectorOptions = {}): any {
|
||||
__destroy.call(component, parent);
|
||||
};
|
||||
|
||||
if (typeof result !== "object") {
|
||||
if (typeof result !== "object" || result === null) {
|
||||
return result;
|
||||
}
|
||||
return new Proxy(result, {
|
||||
|
||||
Reference in New Issue
Block a user