forked from TrueCloudLab/dot-hugo
Merge pull request #173 from ashwin153/patch-2
Do not fail if generatePDF is not defined
This commit is contained in:
commit
974ee76544
1 changed files with 4 additions and 3 deletions
|
@ -130,8 +130,9 @@
|
|||
|
||||
// Download page to pdf format
|
||||
window.onload = function() {
|
||||
document.getElementById("generatePDF")
|
||||
.addEventListener("click", () => {
|
||||
var generatePDF = document.getElementById('generatePDF');
|
||||
if (typeof(generatePDF) != 'undefined' && generatePDF != null) {
|
||||
generatePDF.addEventListener("click", () => {
|
||||
const content = this.document.getElementById("content");
|
||||
console.log(content);
|
||||
console.log(window);
|
||||
|
|
Loading…
Reference in a new issue