diff options
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/pdf/index.vue | 2 | ||||
-rw-r--r-- | app/assets/javascripts/pdf/page/index.vue | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/pdf/index.vue b/app/assets/javascripts/pdf/index.vue index 14640c172cd..bbbd9789dc9 100644 --- a/app/assets/javascripts/pdf/index.vue +++ b/app/assets/javascripts/pdf/index.vue @@ -39,7 +39,7 @@ export default { cMapUrl: '/assets/webpack/cmaps/', cMapPacked: true, }) - .then(this.renderPages) + .promise.then(this.renderPages) .then(pages => { this.pages = pages; this.$emit('pdflabload'); diff --git a/app/assets/javascripts/pdf/page/index.vue b/app/assets/javascripts/pdf/page/index.vue index d933fdf220a..65f84e75e86 100644 --- a/app/assets/javascripts/pdf/page/index.vue +++ b/app/assets/javascripts/pdf/page/index.vue @@ -18,7 +18,7 @@ export default { }, computed: { viewport() { - return this.page.getViewport(this.scale); + return this.page.getViewport({ scale: this.scale }); }, context() { return this.$refs.canvas.getContext('2d'); @@ -36,7 +36,7 @@ export default { this.rendering = true; this.page .render(this.renderContext) - .then(() => { + .promise.then(() => { this.rendering = false; }) .catch(error => { |