Skip to content

Commit

Permalink
update default function name
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiequach committed Jun 26, 2024
1 parent fda0fa4 commit 7f37fb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/PdfReader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ import {
DEFAULT_SHOULD_GROW_WHEN_SCROLLING,
} from '../constants';
import LoadingSkeleton from '../ui/LoadingSkeleton';
import { fetchAsTxt, getResourceUrl, loadResource, SCALE_STEP } from './lib';
import {
getContentDefault,
getResourceUrl,
loadResource,
SCALE_STEP,
} from './lib';
import { makePdfReducer } from './reducer';

/**
Expand All @@ -35,7 +40,7 @@ export default function usePdfReader(args: ReaderArguments): ReaderReturn {
webpubManifestUrl,
manifest,
proxyUrl,
getContent = fetchAsTxt,
getContent = getContentDefault,
injectablesReflowable,
injectablesFixed,
height = DEFAULT_HEIGHT,
Expand Down
2 changes: 1 addition & 1 deletion src/PdfReader/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const loadResource = async (
/**
* Fetches a resource url as text
*/
export async function fetchAsTxt(url: string): Promise<string> {
export async function getContentDefault(url: string): Promise<string> {
return url;
}

Expand Down

0 comments on commit 7f37fb6

Please sign in to comment.