proxied-state-each-blocks
Rich Harris 11 months ago
parent 7fe00b29f6
commit 0df903eef4

@ -1526,10 +1526,7 @@ export function prop_source(props_obj, key, immutable, default_value, call_defau
* @returns {any} * @returns {any}
*/ */
export function prop(props_obj, key) { export function prop(props_obj, key) {
return () => { return is_signal(props_obj) ? () => get(props_obj)[key] : () => props_obj[key];
const props = is_signal(props_obj) ? get(props_obj) : props_obj;
return /** @type {V} */ (props[key]);
};
} }
/** /**

Loading…
Cancel
Save