diff --git a/packages/js/core/src/interfaces/uri-resolver.ts b/packages/js/core/src/interfaces/uri-resolver.ts index 2be4064cbf..9690c02299 100644 --- a/packages/js/core/src/interfaces/uri-resolver.ts +++ b/packages/js/core/src/interfaces/uri-resolver.ts @@ -4,8 +4,8 @@ import { Tracer } from "@polywrap/tracing-js"; import { Result } from "@polywrap/result"; export interface MaybeUriOrManifest { - uri?: string; - manifest?: Uint8Array; + uri?: string | null; + manifest?: Uint8Array | null; } export const module = { @@ -32,8 +32,8 @@ export const module = { invoker: Invoker, wrapper: Uri, path: string - ): Promise> => { - return invoker.invoke({ + ): Promise> => { + return invoker.invoke({ uri: wrapper.uri, method: "getFile", args: { diff --git a/packages/js/uri-resolver-extensions/src/UriResolverExtensionFileReader.ts b/packages/js/uri-resolver-extensions/src/UriResolverExtensionFileReader.ts index b367d8df4d..67145192fe 100644 --- a/packages/js/uri-resolver-extensions/src/UriResolverExtensionFileReader.ts +++ b/packages/js/uri-resolver-extensions/src/UriResolverExtensionFileReader.ts @@ -34,7 +34,7 @@ export class UriResolverExtensionFileReader implements IFileReader { path ); if (!result.ok) return result; - if (result.value === undefined) { + if (!result.value) { return ResultErr(new Error(`File not found at ${path}`)); } return {