@@ -34159,7 +34159,7 @@ function createFiberRoot(
3415934159 return root;
3416034160}
3416134161
34162- var ReactVersion = "18.3.0-www-classic-0db07969 ";
34162+ var ReactVersion = "18.3.0-www-classic-c09aff01 ";
3416334163
3416434164function createPortal$1(
3416534165 children,
@@ -43312,7 +43312,7 @@ function preinitStyle(href, precedence, options) {
4331243312 );
4331343313
4331443314 if (instance) {
43315- state.loading = Loaded;
43315+ state.loading = Loaded & Inserted ;
4331643316 } else {
4331743317 // Construct a new instance and insert it
4331843318 var stylesheetProps = assign(
@@ -43721,6 +43721,7 @@ function acquireResource(hoistableRoot, resource, props) {
4372143721 );
4372243722
4372343723 if (_instance) {
43724+ resource.state.loading |= Inserted;
4372443725 resource.instance = _instance;
4372543726 markNodeAsHoistable(_instance);
4372643727 return _instance;
@@ -44306,74 +44307,76 @@ function suspendResource(hoistableRoot, resource, props) {
4430644307 }
4430744308 }
4430844309
44309- if (resource.instance === null) {
44310- var qualifiedProps = props;
44311- var key = getStyleKey(qualifiedProps.href); // Attempt to hydrate instance from DOM
44310+ if ((resource.state.loading & Inserted) === NotLoaded) {
44311+ if (resource.instance === null) {
44312+ var qualifiedProps = props;
44313+ var key = getStyleKey(qualifiedProps.href); // Attempt to hydrate instance from DOM
4431244314
44313- var instance = hoistableRoot.querySelector(
44314- getStylesheetSelectorFromKey(key)
44315- );
44315+ var instance = hoistableRoot.querySelector(
44316+ getStylesheetSelectorFromKey(key)
44317+ );
4431644318
44317- if (instance) {
44318- // If this instance has a loading state it came from the Fizz runtime.
44319- // If there is not loading state it is assumed to have been server rendered
44320- // as part of the preamble and therefore synchronously loaded. It could have
44321- // errored however which we still do not yet have a means to detect. For now
44322- // we assume it is loaded.
44323- var maybeLoadingState = instance._p;
44319+ if (instance) {
44320+ // If this instance has a loading state it came from the Fizz runtime.
44321+ // If there is not loading state it is assumed to have been server rendered
44322+ // as part of the preamble and therefore synchronously loaded. It could have
44323+ // errored however which we still do not yet have a means to detect. For now
44324+ // we assume it is loaded.
44325+ var maybeLoadingState = instance._p;
4432444326
44325- if (
44326- maybeLoadingState !== null &&
44327- typeof maybeLoadingState === "object" && // $FlowFixMe[method-unbinding]
44328- typeof maybeLoadingState.then === "function"
44329- ) {
44330- var loadingState = maybeLoadingState;
44331- state.count++;
44332- var ping = onUnsuspend.bind(state);
44333- loadingState.then(ping, ping);
44334- }
44327+ if (
44328+ maybeLoadingState !== null &&
44329+ typeof maybeLoadingState === "object" && // $FlowFixMe[method-unbinding]
44330+ typeof maybeLoadingState.then === "function"
44331+ ) {
44332+ var loadingState = maybeLoadingState;
44333+ state.count++;
44334+ var ping = onUnsuspend.bind(state);
44335+ loadingState.then(ping, ping);
44336+ }
4433544337
44336- resource.state.loading |= Inserted;
44337- resource.instance = instance;
44338- markNodeAsHoistable(instance);
44339- return;
44340- }
44338+ resource.state.loading |= Inserted;
44339+ resource.instance = instance;
44340+ markNodeAsHoistable(instance);
44341+ return;
44342+ }
4434144343
44342- var ownerDocument = getDocumentFromRoot(hoistableRoot);
44343- var stylesheetProps = stylesheetPropsFromRawProps(props);
44344- var preloadProps = preloadPropsMap.get(key);
44344+ var ownerDocument = getDocumentFromRoot(hoistableRoot);
44345+ var stylesheetProps = stylesheetPropsFromRawProps(props);
44346+ var preloadProps = preloadPropsMap.get(key);
4434544347
44346- if (preloadProps) {
44347- adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);
44348- } // Construct and insert a new instance
44348+ if (preloadProps) {
44349+ adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);
44350+ } // Construct and insert a new instance
4434944351
44350- instance = ownerDocument.createElement("link");
44351- markNodeAsHoistable(instance);
44352- var linkInstance = instance; // This Promise is a loading state used by the Fizz runtime. We need this incase there is a race
44353- // between this resource being rendered on the client and being rendered with a late completed boundary.
44352+ instance = ownerDocument.createElement("link");
44353+ markNodeAsHoistable(instance);
44354+ var linkInstance = instance; // This Promise is a loading state used by the Fizz runtime. We need this incase there is a race
44355+ // between this resource being rendered on the client and being rendered with a late completed boundary.
4435444356
44355- linkInstance._p = new Promise(function (resolve, reject) {
44356- linkInstance.onload = resolve;
44357- linkInstance.onerror = reject;
44358- });
44359- setInitialProperties(instance, "link", stylesheetProps);
44360- resource.instance = instance;
44361- }
44357+ linkInstance._p = new Promise(function (resolve, reject) {
44358+ linkInstance.onload = resolve;
44359+ linkInstance.onerror = reject;
44360+ });
44361+ setInitialProperties(instance, "link", stylesheetProps);
44362+ resource.instance = instance;
44363+ }
4436244364
44363- if (state.stylesheets === null) {
44364- state.stylesheets = new Map();
44365- }
44365+ if (state.stylesheets === null) {
44366+ state.stylesheets = new Map();
44367+ }
4436644368
44367- state.stylesheets.set(resource, hoistableRoot);
44368- var preloadEl = resource.state.preload;
44369+ state.stylesheets.set(resource, hoistableRoot);
44370+ var preloadEl = resource.state.preload;
4436944371
44370- if (preloadEl && (resource.state.loading & Settled) === NotLoaded) {
44371- state.count++;
44372+ if (preloadEl && (resource.state.loading & Settled) === NotLoaded) {
44373+ state.count++;
4437244374
44373- var _ping = onUnsuspend.bind(state);
44375+ var _ping = onUnsuspend.bind(state);
4437444376
44375- preloadEl.addEventListener("load", _ping);
44376- preloadEl.addEventListener("error", _ping);
44377+ preloadEl.addEventListener("load", _ping);
44378+ preloadEl.addEventListener("error", _ping);
44379+ }
4437744380 }
4437844381 }
4437944382}
0 commit comments