Skip to content

Commit 254a7e3

Browse files
committed
parseInt
1 parent 0251c80 commit 254a7e3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

guided-tour/guided-tour.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
*/
6161
initFrontend() {
6262
// Close Extendify AI assistant for YourHosting (branding ID 5159).
63-
if ( config.brandingId && config.brandingId === 5159 ) {
63+
if ( config.brandingId && parseInt( config.brandingId, 10 ) === 5159 ) {
6464
this.closeExtendifyAssistant();
6565
}
6666

@@ -110,7 +110,7 @@
110110
console.log( 'PP Guided Tour: Initializing editor context', config );
111111

112112
// Close Extendify AI assistant for YourHosting (branding ID 5159).
113-
if ( config.brandingId && config.brandingId === 5159 ) {
113+
if ( config.brandingId && parseInt( config.brandingId, 10 ) === 5159 ) {
114114
this.closeExtendifyAssistant();
115115
}
116116

@@ -120,7 +120,7 @@
120120
console.log( 'PP Guided Tour: wp.domReady fired' );
121121

122122
// Close Extendify editor sidebar for YourHosting.
123-
if ( config.brandingId && config.brandingId === 5159 ) {
123+
if ( config.brandingId && parseInt( config.brandingId, 10 ) === 5159 ) {
124124
this.closeExtendifyEditorSidebar();
125125
}
126126

@@ -136,7 +136,7 @@
136136
console.log( 'PP Guided Tour: Using fallback timeout' );
137137

138138
// Close Extendify editor sidebar for YourHosting.
139-
if ( config.brandingId && config.brandingId === 5159 ) {
139+
if ( config.brandingId && parseInt( config.brandingId, 10 ) === 5159 ) {
140140
this.closeExtendifyEditorSidebar();
141141
}
142142

@@ -1498,13 +1498,15 @@
14981498
* Show tour completion message.
14991499
*/
15001500
showCompletionMessage() {
1501+
const brandingIdNum = config.brandingId ? parseInt( config.brandingId, 10 ) : 0;
15011502
console.log( 'PP Guided Tour: showCompletionMessage called', {
15021503
brandingId: config.brandingId,
1503-
isYourHosting: config.brandingId === 5159,
1504+
brandingIdNum: brandingIdNum,
1505+
isYourHosting: brandingIdNum === 5159,
15041506
} );
15051507

15061508
// Check for YourHosting branding (with safeguard).
1507-
if ( config.brandingId && config.brandingId === 5159 ) {
1509+
if ( brandingIdNum === 5159 ) {
15081510
this.showYourHostingCompletionMessage();
15091511
return;
15101512
}

0 commit comments

Comments
 (0)