Skip to content

Commit

Permalink
Fix file prop checked using function with the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Apr 1, 2021
1 parent 6f1628d commit d8297ae
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Document.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ import {
warnOnDev,
} from './shared/utils';

import { eventProps, isClassName, isRef } from './shared/propTypes';
import {
eventProps,
isClassName,
isFile as isFileProp,
isRef,
} from './shared/propTypes';

const { PDFDataRangeTransport } = pdfjs;

Expand Down Expand Up @@ -382,7 +387,7 @@ Document.propTypes = {
children: PropTypes.node,
className: isClassName,
error: isFunctionOrNode,
file: isFile,
file: isFileProp,
imageResourcesPath: PropTypes.string,
inputRef: isRef,
loading: isFunctionOrNode,
Expand Down

0 comments on commit d8297ae

Please sign in to comment.