This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In a react app, the Tawk.to widget loads before the React app, causing an error to be thrown | |
// if you need to interact with the widget on first load | |
// The code below checks to make see if the widget it initialized | |
// It handles toggling the widget even when it has not initalized yet | |
function tawkWidgetToggle(show){ | |
// Ensure the Tawk object has initalized | |
if(window.$_Tawk && window.$_Tawk.init){ |