mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-09 07:15:39 +00:00
Fix bug with wiki.getTiddlerDataCached()
We need to process the default data outside of the cache function to ensure that we don’t cache the defaults
This commit is contained in:
parent
6343c39bd6
commit
b9a835b879
@ -641,10 +641,10 @@ exports.getTiddlerDataCached = function(titleOrTiddler,defaultData) {
|
|||||||
if(tiddler) {
|
if(tiddler) {
|
||||||
return this.getCacheForTiddler(tiddler.fields.title,"data",function() {
|
return this.getCacheForTiddler(tiddler.fields.title,"data",function() {
|
||||||
// Return the frozen value
|
// Return the frozen value
|
||||||
var value = self.getTiddlerData(tiddler.fields.title,defaultData);
|
var value = self.getTiddlerData(tiddler.fields.title,undefined);
|
||||||
$tw.utils.deepFreeze(value);
|
$tw.utils.deepFreeze(value);
|
||||||
return value;
|
return value;
|
||||||
});
|
}) || defaultData;
|
||||||
} else {
|
} else {
|
||||||
return defaultData;
|
return defaultData;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user