@alan-ai/alan-sdk-web 1.8.36 → 1.8.37

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/dist/alan_lib.js CHANGED
@@ -780,7 +780,7 @@
780
780
 
781
781
  /// <reference types="../global" />
782
782
  (function (ns) {
783
- var alanButtonVersion = '1.8.36';
783
+ var alanButtonVersion = '1.8.37';
784
784
  if (window.alanBtn) {
785
785
  console.warn('Alan: the Alan Button source code has already added (v.' + alanButtonVersion + ')');
786
786
  }
@@ -2027,6 +2027,10 @@
2027
2027
  }
2028
2028
  }
2029
2029
  function activateAlanButton() {
2030
+ if (!firstClick) {
2031
+ firstClick = true;
2032
+ sendClientEvent({ firstClick: true });
2033
+ }
2030
2034
  var activatePromise = new Promise(function (resolve, reject) {
2031
2035
  if (btnDisabled) {
2032
2036
  reject({ err: BTN_IS_DISABLED_CODE });
@@ -2246,10 +2250,6 @@
2246
2250
  if (!dndBackAnimFinished)
2247
2251
  return;
2248
2252
  hidePopup(null);
2249
- if (!firstClick) {
2250
- firstClick = true;
2251
- sendClientEvent({ firstClick: true });
2252
- }
2253
2253
  if (currentErrMsg) {
2254
2254
  if (currentErrMsg === MIC_BLOCKED_MSG) {
2255
2255
  sendClientEvent({ buttonClicked: true, micAllowed: false });