mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Check for the existence of Paloma in the hook Javascript
This commit is contained in:
parent
2ce88be5a5
commit
61e4ea1413
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,11 @@
|
|||
<div class="js-paloma-hook" data-id="<%= id %>">
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
// Do not continue if Paloma not found.
|
||||
if (window['Paloma'] === undefined) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Paloma.env = '<%= Rails.env %>';
|
||||
|
||||
// Remove any callback details if any
|
||||
|
|
Loading…
Reference in a new issue