Skip to content

Commit

Permalink
minor code review re. gorhill#2592
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed May 8, 2017
1 parent 22d7442 commit 622d8f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/js/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ api.fetchText = function(url, onLoad, onError) {
// Force browser cache to be bypassed, but only for resources which have
// been fetched more than one hour ago.
if ( isExternal ) {
var queryValue = Math.floor(Date.now() / 7200000);
var queryValue = '_=' + Math.floor(Date.now() / 7200000);
if ( actualUrl.indexOf('?') === -1 ) {
actualUrl += '?_=' + queryValue;
actualUrl += '?';
} else {
actualUrl += '&_=' + queryValue;
actualUrl += '&';
}
actualUrl += queryValue;
}

if ( typeof onError !== 'function' ) {
Expand Down

0 comments on commit 622d8f2

Please sign in to comment.