Comparing version
@@ -129,3 +129,3 @@ /*! | ||
if (metas[i].getAttribute('name') === metaName) { | ||
return metas[i].getAttribute('content').substr(0, 8192) | ||
return (metas[i].getAttribute('content') || '').substr(0, 8192) | ||
} | ||
@@ -193,2 +193,4 @@ } | ||
} | ||
var expires = new Date() | ||
expires.setSeconds(expires.getSeconds() + clone.expires) | ||
@@ -198,3 +200,3 @@ // When it's localhost, an IP, or custom domain, set the cookie directly | ||
clone.domain = is.local ? null : clone.domain | ||
cookie.setItem(storage.name, uuid, clone.expires, clone.path, clone.domain) | ||
cookie.setItem(storage.name, uuid, expires, clone.path, clone.domain) | ||
} else { | ||
@@ -217,3 +219,3 @@ // Otherwise iterate recursively on the domain until it gets set | ||
clone.domain = domains[i] | ||
cookie.setItem(storage.name, uuid, clone.expires, clone.path, clone.domain) | ||
cookie.setItem(storage.name, uuid, expires, clone.path, clone.domain) | ||
@@ -220,0 +222,0 @@ // Break when cookies aren't being cleared and it gets set properly |
{ | ||
"name": "td-js-sdk", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "bugs": "https://github.com/treasure-data/td-js-sdk/issues", |
@@ -41,3 +41,3 @@ # td-js-sdk | ||
<script type="text/javascript"> | ||
!function(t,e){if(void 0===e[t]){e[t]=function(){e[t].clients.push(this),this._init=[Array.prototype.slice.call(arguments)]},e[t].clients=[];for(var r=function(t){return function(){return this["_"+t]=this["_"+t]||[],this["_"+t].push(Array.prototype.slice.call(arguments)),this}},s=["addRecord","fetchGlobalID","set","trackEvent","trackPageview","trackClicks","ready"],a=0;a<s.length;a++){var c=s[a];e[t].prototype[c]=r(c)}var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=("https:"===document.location.protocol?"https:":"http:")+"//cdn.treasuredata.com/sdk/1.9.1/td.min.js";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i)}}("Treasure",this); | ||
!function(t,e){if(void 0===e[t]){e[t]=function(){e[t].clients.push(this),this._init=[Array.prototype.slice.call(arguments)]},e[t].clients=[];for(var r=function(t){return function(){return this["_"+t]=this["_"+t]||[],this["_"+t].push(Array.prototype.slice.call(arguments)),this}},s=["addRecord","fetchGlobalID","set","trackEvent","trackPageview","trackClicks","ready"],a=0;a<s.length;a++){var c=s[a];e[t].prototype[c]=r(c)}var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=("https:"===document.location.protocol?"https:":"http:")+"//cdn.treasuredata.com/sdk/1.9.2/td.min.js";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i)}}("Treasure",this); | ||
</script> | ||
@@ -44,0 +44,0 @@ ``` |
Sorry, the diff of this file is not supported yet
208026
0.04%1388
0.14%