Skip to content

Commit fa3cf97

Browse files
committed
v14.5.2
1 parent 327a658 commit fa3cf97

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "14.5.1",
3+
"version": "14.5.2",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/14.5.2/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GleapCopilotTours.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,16 @@ export default class GleapCopilotTours {
187187
}
188188

189189
disable() {
190-
this.cleanup();
191190
this.disabled = true;
191+
192+
this.cleanup();
192193
}
193194

194195
startWithConfig(tourId, config, onCompleteCallback = undefined) {
195196
if (typeof window === "undefined") return;
196197
if (this.productTourId) return;
198+
if (this.disabled) return;
199+
197200
this.productTourId = tourId;
198201
this.productTourData = config;
199202
this.currentActiveIndex = 0;
@@ -754,6 +757,8 @@ export default class GleapCopilotTours {
754757

755758
start() {
756759
if (typeof window === "undefined") return;
760+
if (this.disabled) return;
761+
757762
const config = this.productTourData;
758763
if (!config) return;
759764
canPlayAudio().then((supported) => {
@@ -828,8 +833,8 @@ export default class GleapCopilotTours {
828833

829834
renderNextStep() {
830835
if (typeof window === "undefined") return;
831-
832836
if (this.disabled) return;
837+
833838
const self = this;
834839
const config = this.productTourData;
835840
const steps = config.steps;

src/GleapProductTours.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default class GleapProductTours {
4242
if (typeof window !== "undefined") {
4343
const beforeUnloadListener = (event) => {
4444
if (
45+
!self?.disabled &&
4546
self?.productTourId &&
4647
self?.productTourData &&
4748
self?.productTourData?.tourType !== "cobrowse"

0 commit comments

Comments
 (0)