Skip to content

Commit

Permalink
missing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcancellieri committed Dec 1, 2023
1 parent fcfe0c3 commit 1ebf4bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*.{js,jsx}": ["npm run lint:js -- --fix", "git add"],
"*.{json,scss,css}": ["npm run lint:css -- --write", "git add"]
"*.{scss,css}": ["npm run lint:css -- ", "git add"]
}
13 changes: 6 additions & 7 deletions reader/components/highlighter/highlights.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ class Highlights extends React.PureComponent {
}
/* eslint-enable react/no-array-index-key,no-restricted-syntax */

const portals = Object.entries(
annotationsByPage
).map(([pageNumber, pageHighlights]) =>
ReactDom.createPortal(
pageHighlights,
findOrCreateLayerForHighlights(findPageLayer(pageNumber))
)
const portals = Object.entries(annotationsByPage).map(
([pageNumber, pageHighlights]) =>
ReactDom.createPortal(
pageHighlights,
findOrCreateLayerForHighlights(findPageLayer(pageNumber))
)
)

this.setState({ portals })
Expand Down
4 changes: 2 additions & 2 deletions reader/lib/pdf-js/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

const pdfjs = require('pdfjs-dist/build/pdf')
const PdfjsWorker = require('pdfjs-dist/build/pdf.worker')
const pdfjs = require('pdfjs-dist/lib/pdf')
const PdfjsWorker = require('pdfjs-dist/lib/pdf.worker')

if (typeof window !== 'undefined' && 'Worker' in window)
pdfjs.GlobalWorkerOptions.workerPort = new PdfjsWorker()
Expand Down

0 comments on commit 1ebf4bf

Please sign in to comment.