releasebird-javascript-sdk 1.0.18 → 1.0.19

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/src/index.js CHANGED
@@ -52,11 +52,16 @@ class Rbird {
52
52
  }
53
53
 
54
54
  static initialize(apiKey) {
55
+ console.log('bin in init');
55
56
  initialize(apiKey, true);
56
57
  }
57
58
 
58
59
  static initialize(apiKey, showButton) {
59
60
  try {
61
+ if (showButton === undefined) {
62
+ showButton = true;
63
+ }
64
+ console.log('bin in init');
60
65
  const instance = this.getInstance();
61
66
  if (instance.initialized) {
62
67
  console.warn("Rbird already initialized.");
@@ -65,7 +70,8 @@ class Rbird {
65
70
  RbirdWebsiteWidget.getInstance().noButton = !showButton;
66
71
  RbirdSessionManager.getInstance().init(apiKey).then(() => {
67
72
  instance.initialized = true;
68
- if (showButton != null) {
73
+ if (showButton) {
74
+ console.log('bin in show button');
69
75
  RbirdWebsiteWidget.getInstance().showButton(showButton);
70
76
  }
71
77
  })