Skip to content

Commit 9d4c40e

Browse files
committed
Convert Resource Chunks to JS
Previously, partials would not get converted to JS (they would rendered as spark templates inside of the rendered JS output).
1 parent 2e86cca commit 9d4c40e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Spark/Compiler/Javascript/JavascriptViewCompiler.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public override void GenerateSourceCode(IEnumerable<IList<Chunk>> viewTemplates,
4646
// convert some syntax from csharp to javascript
4747
foreach (var template in viewTemplates)
4848
anonymousTypeVisitor.Accept(template);
49-
49+
foreach (var template in allResources)
50+
anonymousTypeVisitor.Accept(template);
51+
5052
var cumulativeName = "window.Spark";
5153
foreach (var part in nameParts.Where(p => p != "~"))
5254
{
@@ -121,4 +123,4 @@ static string SafeName(string name)
121123
return safeName.Replace(".", "");
122124
}
123125
}
124-
}
126+
}

0 commit comments

Comments
 (0)