@mobil80-dev/chatbot-widget 2.0.9 → 3.0.0

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/index.js CHANGED
@@ -274,7 +274,7 @@ function updateCard (config) {
274
274
  const data = await res.json();
275
275
  hideLoader(sendBtn);
276
276
  addBotMessage(
277
- data?.data?.blocks?.map(b => b.text).join('\n') || 'No response'
277
+ data?.data?.blocks?.map(b => b.text).join('\n') || data?.data || 'No response'
278
278
  );
279
279
  } catch {
280
280
  hideLoader(sendBtn);
package/dist/index.umd.js CHANGED
@@ -280,7 +280,7 @@
280
280
  const data = await res.json();
281
281
  hideLoader(sendBtn);
282
282
  addBotMessage(
283
- data?.data?.blocks?.map(b => b.text).join('\n') || 'No response'
283
+ data?.data?.blocks?.map(b => b.text).join('\n') || data?.data || 'No response'
284
284
  );
285
285
  } catch {
286
286
  hideLoader(sendBtn);
package/index.js CHANGED
@@ -274,7 +274,7 @@ function updateCard (config) {
274
274
  const data = await res.json()
275
275
  hideLoader(sendBtn)
276
276
  addBotMessage(
277
- data?.data?.blocks?.map(b => b.text).join('\n') || 'No response'
277
+ data?.data?.blocks?.map(b => b.text).join('\n') || data?.data || 'No response'
278
278
  )
279
279
  } catch {
280
280
  hideLoader(sendBtn)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobil80-dev/chatbot-widget",
3
- "version": "2.0.9",
3
+ "version": "3.0.0",
4
4
  "description": "Drop-in JavaScript chat widget for websites (no iframe, no framework)",
5
5
  "author": "NanthaGopal",
6
6
  "license": "MIT",