1 file changed
+1
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
508 |
| - | |
| 508 | + | |
509 | 509 |
| |
510 | 510 |
| |
511 | 511 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
508 |
| - | |
| 508 | + | |
509 | 509 |
| |
510 | 510 |
| |
511 | 511 |
| |
|
2 commit comments
vinodkumarsharma276 commentedon May 15, 2024
Hi @wojtekmaj ,
We are using v4.2.0 and recently got a security issue mentioning isEvalSupported: true can cause issues.
I bumped react-pdf to v7.* which should fix the security thread with isEvalSupported: false but I'm getting typing issues.
One of the issue:
We are using component and passing customTextRenderer as:
customTextRederer = (textInfo: { str: string; itemIndex: number }) => {
return (
<span
<..Some span attributes>
);
};
while building the project getting error:
_```
Type '(textInfo: { str: string; itemIndex: number;}) => React.JSX.Element' is not assignable to type 'CustomTextRenderer'.
ERR! Type 'Element' is not assignable to type 'string'.
ERR!
ERR! 117 customTextRenderer={this.customTextRenderer}
ERR! ~~~~~~~~~~~~~~~~~~
export type CustomTextRenderer = (props: {
pageIndex: number;
pageNumber: number;
itemIndex: number;
} & TextItem) => string;
wojtekmaj commentedon May 15, 2024
Path for upgrade is clearly outlined both in Wiki and release notes for every major version.
Only v7 and v8 have received a patch and I'm not planning to support older versions.
Read more: #1786