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