releasebird-javascript-sdk 1.0.18 → 1.0.20

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.
@@ -119,7 +119,7 @@ export default class RbirdSessionManager {
119
119
  identifyUser(identify, hash) {
120
120
  let state = this.getState();
121
121
  state.identify.properties = identify;
122
- state.identify.hash = identify.hash;
122
+ state.identify.hash = hash;
123
123
  const http = new XMLHttpRequest();
124
124
  http.open("POST", `${API}/ewidget/identify`);
125
125
  http.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
package/src/index.js CHANGED
@@ -57,6 +57,9 @@ class Rbird {
57
57
 
58
58
  static initialize(apiKey, showButton) {
59
59
  try {
60
+ if (showButton === undefined) {
61
+ showButton = true;
62
+ }
60
63
  const instance = this.getInstance();
61
64
  if (instance.initialized) {
62
65
  console.warn("Rbird already initialized.");
@@ -65,7 +68,7 @@ class Rbird {
65
68
  RbirdWebsiteWidget.getInstance().noButton = !showButton;
66
69
  RbirdSessionManager.getInstance().init(apiKey).then(() => {
67
70
  instance.initialized = true;
68
- if (showButton != null) {
71
+ if (showButton) {
69
72
  RbirdWebsiteWidget.getInstance().showButton(showButton);
70
73
  }
71
74
  })