Skip to content

Commit 0a5b05e

Browse files
authored
fix missing import error (#4206)
1 parent 1cc7698 commit 0a5b05e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compat/src/suspense.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, createElement, options, Fragment } from 'preact';
2-
import { MODE_HYDRATE } from 'preact/src/constants';
2+
import { MODE_HYDRATE } from '../../src/constants';
33
import { assign } from './util';
44

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

0 commit comments

Comments
 (0)