@alan-ai/alan-sdk-web 1.8.38 → 1.8.39

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
@@ -781,7 +781,7 @@
781
781
 
782
782
  /// <reference types="../global" />
783
783
  (function (ns) {
784
- var alanButtonVersion = '1.8.38';
784
+ var alanButtonVersion = '1.8.39';
785
785
  if (window.alanBtn) {
786
786
  console.warn('Alan: the Alan Button source code has already added (v.' + alanButtonVersion + ')');
787
787
  }
@@ -2032,6 +2032,19 @@
2032
2032
  firstClick = true;
2033
2033
  sendClientEvent({ firstClick: true });
2034
2034
  }
2035
+ if (state === 'default') {
2036
+ coldPlayForSoundNext();
2037
+ }
2038
+ if (currentErrMsg) {
2039
+ if (currentErrMsg === MIC_BLOCKED_MSG) {
2040
+ sendClientEvent({ buttonClicked: true, micAllowed: false });
2041
+ showAlert(currentErrMsg);
2042
+ }
2043
+ else {
2044
+ showAlert(currentErrMsg);
2045
+ }
2046
+ return;
2047
+ }
2035
2048
  var activatePromise = new Promise(function (resolve, reject) {
2036
2049
  if (btnDisabled) {
2037
2050
  reject({ err: BTN_IS_DISABLED_CODE });
@@ -2251,19 +2264,8 @@
2251
2264
  if (!dndBackAnimFinished)
2252
2265
  return;
2253
2266
  hidePopup(null);
2254
- if (currentErrMsg) {
2255
- if (currentErrMsg === MIC_BLOCKED_MSG) {
2256
- sendClientEvent({ buttonClicked: true, micAllowed: false });
2257
- showAlert(currentErrMsg);
2258
- }
2259
- else {
2260
- showAlert(currentErrMsg);
2261
- }
2262
- return;
2263
- }
2264
2267
  if (alanAudio) {
2265
2268
  if (state === 'default') {
2266
- coldPlayForSoundNext();
2267
2269
  activateAlanButton();
2268
2270
  }
2269
2271
  else {