fix a bug that would keep loadFile from caching files
This commit is contained in:
parent
116d0bfdbf
commit
925aa8d627
2 changed files with 5 additions and 3 deletions
|
@ -122,13 +122,15 @@ Ox.load = function() {
|
|||
};
|
||||
|
||||
Ox.Log = (function() {
|
||||
var filter = /.*?/,
|
||||
var filter = /*localStorage && localStorage.filter
|
||||
? new RegExp(localStorage.filter) || */'/.*?/',
|
||||
that = function() {
|
||||
Ox.Log.log.apply(null, arguments);
|
||||
return that;
|
||||
};
|
||||
that.filter = function(regexp) {
|
||||
filter = regexp;
|
||||
// ...
|
||||
};
|
||||
that.log = function() {
|
||||
if (filter.test(JSON.stringify(arguments))) {
|
||||
|
|
|
@ -91,10 +91,10 @@ Ox.loadFile = (function() {
|
|||
if (isImage) {
|
||||
// for an image, save the element itself,
|
||||
// so that it remains in the browser cache
|
||||
cache['file'] = element;
|
||||
cache[file] = element;
|
||||
callback(element);
|
||||
} else {
|
||||
cache['file'] = true;
|
||||
cache[file] = true;
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue