1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Remove no-op onPull/onCancel streamSink callbacks from the "GetTextContent"-handler

The `MessageHandler`-implementation already handles either of these callbacks being undefined, hence there's no particular reason (as far as I can tell) to add no-op functions here.

Also, in a couple of `MessageHandler`-methods, utilize an already existing local variable more.
This commit is contained in:
Jonas Jenwald 2021-09-06 11:19:12 +02:00
parent f90f9466e3
commit 45ddb12f61
2 changed files with 2 additions and 4 deletions

View file

@ -737,8 +737,6 @@ class WorkerMessageHandler {
handler.on("GetTextContent", function wphExtractText(data, sink) {
const pageIndex = data.pageIndex;
sink.onPull = function (desiredSize) {};
sink.onCancel = function (reason) {};
pdfManager.getPage(pageIndex).then(function (page) {
const task = new WorkerTask("GetTextContent: page " + pageIndex);