Skip to content

Commit

Permalink
replace isSignal with isSignal2 for useresource
Browse files Browse the repository at this point in the history
  • Loading branch information
Varixo committed Aug 18, 2024
1 parent 4de71a5 commit a8d830e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/qwik/src/core/use/use-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ import {
import type { Container2, fixMeAny } from '../../server/qwik-types';
import type { GetObjID } from '../container/container';
import type { JSXOutput } from '../render/jsx/types/jsx-node';
import { isSignal, type Signal } from '../state/signal';
import { type Signal } from '../state/signal';
import { isPromise } from '../util/promises';
import { isObject } from '../util/types';
import { Store2Flags, createStore2, getStoreTarget2 } from '../v2/signal/v2-store';
import { useSequentialScope } from './use-sequential-scope';
import { isSignal2 } from '../v2/signal/v2-signal';

const DEBUG: boolean = false;

Expand Down Expand Up @@ -285,7 +286,7 @@ function getResourceValueAsPromise<T>(props: ResourceProps<T>): Promise<JSXOutpu
useBindInvokeContext(props.onResolved),
useBindInvokeContext(props.onRejected)
);
} else if (isSignal(resource)) {
} else if (isSignal2(resource)) {
return Promise.resolve(resource.value).then(
useBindInvokeContext(props.onResolved),
useBindInvokeContext(props.onRejected)
Expand Down

0 comments on commit a8d830e

Please sign in to comment.