Fix getCacheForTiddler to cache falsy values (#5413)

* getCacheForTiddler can cache falsy values

* Switch to "!== undefined" for getCacheForTiddler
This commit is contained in:
Cameron Fischer 2021-09-10 16:17:35 -04:00 committed by GitHub
parent 9830e0104f
commit 7282ec5286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -844,7 +844,7 @@ exports.clearGlobalCache = function() {
exports.getCacheForTiddler = function(title,cacheName,initializer) {
this.caches = this.caches || Object.create(null);
var caches = this.caches[title];
if(caches && caches[cacheName]) {
if(caches && caches[cacheName] !== undefined) {
return caches[cacheName];
} else {
if(!caches) {