node_modules/preact/compat/src/forwardRef.js in isomorfeus-preact-10.6.62 vs node_modules/preact/compat/src/forwardRef.js in isomorfeus-preact-10.7.0

- old
+ new

@@ -22,20 +22,13 @@ * of the wrapped component instead of one of the wrapper itself. * @param {import('./index').ForwardFn} fn * @returns {import('./internal').FunctionComponent} */ export function forwardRef(fn) { - // We always have ref in props.ref, except for - // mobx-react. It will call this function directly - // and always pass ref as the second argument. - function Forwarded(props, ref) { + function Forwarded(props) { let clone = assign({}, props); delete clone.ref; - ref = props.ref || ref; - return fn( - clone, - !ref || (typeof ref === 'object' && !('current' in ref)) ? null : ref - ); + return fn(clone, props.ref || null); } // mobx-react checks for this being present Forwarded.$$typeof = REACT_FORWARD_SYMBOL; // mobx-react heavily relies on implementation details.