(prevProps: PdfViewerProps)
| 73 | } |
| 74 | |
| 75 | componentDidUpdate(prevProps: PdfViewerProps) { |
| 76 | const props = this.props; |
| 77 | |
| 78 | if ( |
| 79 | isApiOutdated(prevProps.src, props.src, prevProps.data, props.data) || |
| 80 | resolveVariableAndFilter(props.src, props.data, '| raw') !== |
| 81 | resolveVariableAndFilter(prevProps.src, prevProps.data, '| raw') |
| 82 | ) { |
| 83 | this.abortLoad(); |
| 84 | setTimeout(() => { |
| 85 | this.fetchPdf(); |
| 86 | }, 0); |
| 87 | } |
| 88 | |
| 89 | if (getVariable(props.data, props.name)) { |
| 90 | if ( |
| 91 | getVariable(prevProps.data, prevProps.name) !== |
| 92 | getVariable(props.data, props.name) |
| 93 | ) { |
| 94 | this.abortLoad(); |
| 95 | this.renderPdf(); |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | componentWillUnmount() { |
| 101 | this.abortLoad(); |
nothing calls this directly
no test coverage detected