1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-20 22:16:52 +00:00

Fix nested colour definitions

This commit is contained in:
Jeremy Ruston 2024-10-23 09:39:18 +01:00
parent 1e5c69eb99
commit 4af573aaf9

View File

@ -342,7 +342,15 @@ Widget.prototype.makeFakeWidgetWithVariables = function(variables) {
makeFakeWidgetWithVariables: self.makeFakeWidgetWithVariables,
resolveVariableParameters: self.resolveVariableParameters,
wiki: self.wiki,
variables: variables,
get variables() {
// We have to inefficiently fake the variables hashmap. It would be better to refactor the places
// that make direct access to the variables hashmap
const v = Object.create(self.parentWidget.variables || null);
$tw.utils.each(variables,function(value,name) {
v[name] = {value: value};
});
return v;
},
getAncestorCount: function() {
return 0;
}