diff --git a/package.json b/package.json index a8c5b08..1eb6f5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismic-toolbar", - "version": "4.0.4", + "version": "4.0.5", "description": "Prismic Toolbar", "license": "Apache-2.0", "main": "build/prismic-toolbar.js", diff --git a/src/toolbar/preview/index.js b/src/toolbar/preview/index.js index 6fc6b11..1ff5dcb 100644 --- a/src/toolbar/preview/index.js +++ b/src/toolbar/preview/index.js @@ -44,7 +44,10 @@ export class Preview { async updatePreview() { const { reload, ref } = await this.client.updatePreview(); this.start(ref); - if (reload) { reloadOrigin(); } + if (reload) { + this.cancelPreviewUpdates(); + reloadOrigin(); + } } // Start preview