Skip to content

Commit 0691295

Browse files
authoredFeb 4, 2025··
fix(runtime): don't flag html tag with hydrate flag anymore (#6103)
* fix(runtime): don't flag html tag with hydrate flag anymore * fix linter * remove unit test * fix unit test
1 parent bc8cc65 commit 0691295

File tree

3 files changed

+1
-60
lines changed

3 files changed

+1
-60
lines changed
 

‎src/runtime/test/hydrated.spec.tsx

-52
This file was deleted.

‎src/runtime/test/lifecycle-async.spec.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ describe('lifecycle async', () => {
111111
@Component({ tag: 'cmp-a' })
112112
class CmpA {
113113
componentWillLoad() {
114-
expect(document.documentElement.classList.contains('hydrated')).toBe(false);
115114
window.addEventListener('appload', (ev: CustomEvent) => mockEvent(ev.detail));
116115
}
117116

@@ -125,7 +124,6 @@ describe('lifecycle async', () => {
125124
includeAnnotations: true,
126125
});
127126

128-
expect(document.documentElement.classList.contains('hydrated')).toBe(true);
129127
expect(mockEvent).toHaveBeenCalledTimes(1);
130128
expect(mockEvent).toHaveBeenCalledWith({
131129
namespace: 'app',

‎src/runtime/update-component.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { BUILD, NAMESPACE } from '@app-data';
2-
import { Build, consoleError, doc, getHostRef, nextTick, plt, win, writeTask } from '@platform';
2+
import { Build, consoleError, getHostRef, nextTick, plt, win, writeTask } from '@platform';
33
import { CMP_FLAGS, HOST_FLAGS } from '@utils';
44

55
import type * as d from '../declarations';
@@ -415,11 +415,6 @@ export const forceUpdate = (ref: any) => {
415415
};
416416

417417
export const appDidLoad = (who: string) => {
418-
// on appload
419-
// we have finish the first big initial render
420-
if (BUILD.cssAnnotations) {
421-
addHydratedFlag(doc.documentElement);
422-
}
423418
if (BUILD.asyncQueue) {
424419
plt.$flags$ |= PLATFORM_FLAGS.appLoaded;
425420
}

0 commit comments

Comments
 (0)
Please sign in to comment.