1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

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

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) {