Merge pull request #270 from gfiumara/kePrintTempFix
Workaround to not execute undefined functions.
diff --git a/inst/kePrint-0.0.1/kePrint.js b/inst/kePrint-0.0.1/kePrint.js
index 4f9728d..e6fbbfc 100644
--- a/inst/kePrint-0.0.1/kePrint.js
+++ b/inst/kePrint-0.0.1/kePrint.js
@@ -1,4 +1,8 @@
$(document).ready(function(){
- $('[data-toggle="tooltip"]').tooltip();
- $('[data-toggle="popover"]').popover();
+ if (typeof $('[data-toggle="tooltip"]').tooltip === 'function') {
+ $('[data-toggle="tooltip"]').tooltip();
+ }
+ if ($('[data-toggle="popover"]').popover === 'function') {
+ $('[data-toggle="popover"]').popover();
+ }
});