react-freshchat
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -185,3 +185,4 @@ (function (global, factory) { | ||
return earlyCalls.queue({ method: method, args: args }); | ||
console.info('Queing', method); | ||
earlyCalls.queue({ method: method, args: args }); | ||
}; | ||
@@ -192,3 +193,4 @@ }; | ||
var id = 'freshchat-lib'; | ||
if (document.getElementById(id)) return; | ||
if (document.getElementById(id) || window.fcWidget) return; | ||
console.info('Loading FreshChat Lib'); | ||
var script = document.createElement('script'); | ||
@@ -210,2 +212,4 @@ script.async = 'true'; | ||
console.info('FreshChat Component :)'); | ||
var token = props.token, | ||
@@ -212,0 +216,0 @@ moreProps = _objectWithoutProperties(props, ['token']); |
{ | ||
"name": "react-freshchat", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "FreshChat React implementation", | ||
@@ -5,0 +5,0 @@ "main": "build/react-freshchat.js", |
@@ -64,7 +64,11 @@ import _ from 'lodash/fp' | ||
let queueMethod = method => (...args) => earlyCalls.queue({ method, args }) | ||
let queueMethod = method => (...args) => { | ||
console.info('Queing', method) | ||
earlyCalls.queue({ method, args }) | ||
} | ||
let loadScript = () => { | ||
let id = 'freshchat-lib' | ||
if (document.getElementById(id)) return | ||
if (document.getElementById(id) || window.fcWidget) return | ||
console.info('Loading FreshChat Lib') | ||
let script = document.createElement('script') | ||
@@ -81,2 +85,4 @@ script.async = 'true' | ||
super(props) | ||
console.info('FreshChat Component :)') | ||
@@ -83,0 +89,0 @@ let { token, ...moreProps } = props |
15858
393