Fix bugs and add tests #145

Merged
BehindTheMath merged 11 commits from fix/bugs-and-add-tests into master 2018-04-09 22:36:33 -05:00
3 changed files with 4 additions and 0 deletions
Showing only changes of commit 31a6f44c97 - Show all commits

View File

@@ -13,6 +13,7 @@ module.exports = function(el) {
script.type = "text/javascript"
/* istanbul ignore if */
if (src !== "") {
script.src = src
script.async = false // force synchronous loading of peripheral JS
@@ -23,6 +24,7 @@ module.exports = function(el) {
script.appendChild(document.createTextNode(code))
}
catch (e) {
/* istanbul ignore next */
// old IEs have funky script nodes
script.text = code
}

View File

@@ -30,6 +30,7 @@ module.exports = function(options) {
return options
}
/* istanbul ignore next */
function defaultAnalytics() {
if (window._gaq) {
_gaq.push(["_trackPageview"])

View File

@@ -1,4 +1,5 @@
module.exports = function(obj) {
/* istanbul ignore if */
if (null === obj || "object" !== typeof obj) {
return obj
}