Skip to content

Commit

Permalink
fix missing import error (#4206)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Nov 11, 2023
1 parent 1cc7698 commit 0a5b05e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compat/src/suspense.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, createElement, options, Fragment } from 'preact';
import { MODE_HYDRATE } from 'preact/src/constants';
import { MODE_HYDRATE } from '../../src/constants';
import { assign } from './util';

const oldCatchError = options._catchError;
Expand Down Expand Up @@ -167,7 +167,10 @@ Suspense.prototype._childDidSuspend = function (promise, suspendingVNode) {
* to remain on screen and hydrate it when the suspense actually gets resolved.
* While in non-hydration cases the usual fallback -> component flow would occour.
*/
if (!c._pendingSuspensionCount++ && !(suspendingVNode._flags & MODE_HYDRATE)) {
if (
!c._pendingSuspensionCount++ &&
!(suspendingVNode._flags & MODE_HYDRATE)
) {
c.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });
}
promise.then(onResolved, onResolved);
Expand Down

0 comments on commit 0a5b05e

Please sign in to comment.