Improve check for analytics function option
This commit is contained in:
1 parent
f559ca2914
commit
cc384b9b16
1 file changed
+1
-1
@@ -9,7 +9,7 @@ module.exports = function(options) {
|
|||||||
this.options.switches = this.options.switches || {}
|
this.options.switches = this.options.switches || {}
|
||||||
this.options.switchesOptions = this.options.switchesOptions || {}
|
this.options.switchesOptions = this.options.switchesOptions || {}
|
||||||
this.options.history = this.options.history || true
|
this.options.history = this.options.history || true
|
||||||
this.options.analytics = this.options.analytics || function() {
|
this.options.analytics = (typeof this.options.analytics === "function") ? this.options.analytics : function() {
|
||||||
if (window._gaq) {
|
if (window._gaq) {
|
||||||
_gaq.push(["_trackPageview"])
|
_gaq.push(["_trackPageview"])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user