Skip to content

Commit

Permalink
fix(runtime): don't flag html tag with hydrate flag anymore (#6103)
Browse files Browse the repository at this point in the history
* fix(runtime): don't flag html tag with hydrate flag anymore

* fix linter

* remove unit test

* fix unit test
  • Loading branch information
christian-bromann authored Feb 4, 2025
1 parent bc8cc65 commit 0691295
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 60 deletions.
52 changes: 0 additions & 52 deletions src/runtime/test/hydrated.spec.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/runtime/test/lifecycle-async.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ describe('lifecycle async', () => {
@Component({ tag: 'cmp-a' })
class CmpA {
componentWillLoad() {
expect(document.documentElement.classList.contains('hydrated')).toBe(false);
window.addEventListener('appload', (ev: CustomEvent) => mockEvent(ev.detail));
}

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

expect(document.documentElement.classList.contains('hydrated')).toBe(true);
expect(mockEvent).toHaveBeenCalledTimes(1);
expect(mockEvent).toHaveBeenCalledWith({
namespace: 'app',
Expand Down
7 changes: 1 addition & 6 deletions src/runtime/update-component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BUILD, NAMESPACE } from '@app-data';
import { Build, consoleError, doc, getHostRef, nextTick, plt, win, writeTask } from '@platform';
import { Build, consoleError, getHostRef, nextTick, plt, win, writeTask } from '@platform';
import { CMP_FLAGS, HOST_FLAGS } from '@utils';

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

export const appDidLoad = (who: string) => {
// on appload
// we have finish the first big initial render
if (BUILD.cssAnnotations) {
addHydratedFlag(doc.documentElement);
}
if (BUILD.asyncQueue) {
plt.$flags$ |= PLATFORM_FLAGS.appLoaded;
}
Expand Down

0 comments on commit 0691295

Please sign in to comment.