@toolspack/ttd-pdfjs 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolspack/ttd-pdfjs",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
5
  "main": "lib/ttd-pdfjs.umd.min.js",
6
6
  "scripts": {
@@ -202,8 +202,10 @@ export default {
202
202
  if (this.pdfDoc) {
203
203
  if (this.viewport) {
204
204
  const { canvas } = this.$refs
205
- const cxt = canvas.getContext('2d')
206
- cxt.clearRect(0, 0, this.viewport.width, this.viewport.height);
205
+ if (canvas) {
206
+ const cxt = canvas.getContext('2d')
207
+ cxt.clearRect(0, 0, this.viewport.width, this.viewport.height);
208
+ }
207
209
  }
208
210
  this.viewport = null
209
211
  this.pdfDoc.destroy();