Skip to content

Commit

Permalink
stephanrauh/ngx-extended-pdf-viewer#1059 fix the "Window is not defin…
Browse files Browse the repository at this point in the history
…ed" bug
  • Loading branch information
stephanrauh committed Dec 4, 2021
1 parent 84b8e70 commit cd50063
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/core/annotation.js
Expand Up @@ -23,6 +23,7 @@ import {
assert,
escapeString,
getModificationDate,
info,
isAscii,
isString,
OPS,
Expand Down Expand Up @@ -146,7 +147,7 @@ class AnnotationFactory {
// #639 modified by ngx-extended-pdf- viewer
case "Sig":
if (self.showUnverifiedSignatures) {
Window['ngxConsole'].log(
info(
"The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing."
);
return new SignatureWidgetAnnotation(parameters);
Expand Down Expand Up @@ -1312,7 +1313,7 @@ class WidgetAnnotation extends Annotation {
// #171 modification start
if (!self.showUnverifiedSignatures) {
this.setFlags(AnnotationFlag.HIDDEN);
Window['ngxConsole'].log(
info(
"The PDF file contains a signature. Please take into account that it can't be verified yet. By default, ngx-extended-pdf-viewer hides signatures until you configure it otherwise."
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/worker.js
Expand Up @@ -856,7 +856,7 @@ class WorkerMessageHandler {
// #171 receive options from ngx-extended-pdf-viewer
handler.on("showUnverifiedSignatures", function wphReady(data) {
if (data) {
Window['ngxConsole'].log(
info(
"showUnverifiedSignatures=" +
data +
". This is an incompletely implemented feature. Signatures cannot be validated, so use it at own risk."
Expand Down

0 comments on commit cd50063

Please sign in to comment.