Skip to content

Commit

Permalink
fix(runtime): adds a testing check to the forceUpdate method
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduy1407 committed Dec 5, 2023
1 parent 5be58ce commit 6c40192
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime/update-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export const postUpdateComponent = (hostRef: d.HostRef) => {
};

export const forceUpdate = (ref: any) => {
if (BUILD.updatable && Build.isBrowser) {
if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
const hostRef = getHostRef(ref);
const isConnected = hostRef.$hostElement$.isConnected;
if (
Expand Down
4 changes: 2 additions & 2 deletions src/testing/platform/testing-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type * as d from '@rindo/core/internal';

export const Build: d.UserBuildConditionals = {
isDev: true,
isBrowser: true,
isServer: false,
isBrowser: false,
isServer: true,
isTesting: true,
};

0 comments on commit 6c40192

Please sign in to comment.