fix: missing attributes must be undefined (#9682)

This commit is contained in:
Saq Imtiaz
2026-02-22 22:16:07 +01:00
committed by GitHub
parent add3d425b5
commit 75c26b46c6
2 changed files with 40 additions and 1 deletions
+1 -1
View File
@@ -390,7 +390,7 @@ Widget.prototype.computeAttributes = function(options) {
if($tw.utils.isArray(value)) {
multiValue = value;
newMultiValuedAttributes[name] = multiValue;
value = value[0] || "";
value = value[0];
}
var changed = (self.attributes[name] !== value);
if(!changed && multiValue && self.multiValuedAttributes) {
@@ -0,0 +1,39 @@
title: Transclude/MissingTiddlerAttribute
description: Missing Tiddler Attribute
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\procedure testproc()
This is ''wikitext''
\end
<$tiddler tiddler="Data">
<$transclude $index="testindex"/>
-
{{##testindex}}
-
<$transclude $field="custom"/>
-
{{!!custom}}
</$tiddler>
+
title: Data
type: application/x-tiddler-dictionary
custom: This is ''wikitext''
testindex: This is ''wikitext''
+
title: ExpectedResult
<p>
This is <strong>wikitext</strong>
-
This is <strong>wikitext</strong>
-
This is <strong>wikitext</strong>
-
This is <strong>wikitext</strong>
</p>