Patch Changes
-
#4208
69a2adbThanks @LuLaValva! - Allow hoisted tag variables to beundefinedin debug builds, fixing a falseHoisted values must be functionserror when a dynamic tag with a falsy tag name does not render. -
#4305
07a3199Thanks @DylanPiercey! - Stop declaring$globalin the server render when every$globalread sits in a value the compiler drops, such as an attribute the child tag never reads, a repeated native attribute, or theof=of an empty<for>. -
#4297
b421f86Thanks @LuLaValva! - Fix an html compile crash (Cannot read properties of null (reading 'isExpressionStatement')) when hoisting a serialized rest alias whose owning section is the program itself, such as a{ a, ...rest }destructure spread inside an<else> -
#4315
2a105f3Thanks @DylanPiercey! - Fix aCannot read properties of undefinederror when content that resumes after its owner, such as the body a lazily loaded tag passes to a child or content behind a<try>placeholder, reads two values of its owner and only one of them was sent to the browser. Resumed content now re-renders only for a value the page changed while the content was pending, instead of for any value the server happened to send. -
#4314
7b55f27Thanks @DylanPiercey! - Link a template into the page entry only when its own code revives it: a scope that serializes only behind param reasons links nothing (a client-fed param implies a parent with client work, which already bundles the template), and a native tag variable nothing reads no longer serializes its element. -
#4304
4ebc06dThanks @DylanPiercey! - Thecontentattribute of native tags now rejects a string in TypeScript, except on<meta>, wherecontentis the HTML attribute. A string was never rendered as content: the server threwInvalid `content` attribute, so<button content="Save"/>orrender({ content: "Save" })against anInputextendingMarko.HTML.Buttontype-checked and then failed at runtime. -
#4309
f41fa21Thanks @DylanPiercey! - Reuse an already hoisted serialize guard in the server output when a guard combines parameters of nested sections, instead of repeating the runtime check inline. -
#4305
cdba8bbThanks @DylanPiercey! - Compile an unread<const>,<id>or<let>whose value is bare$globalor$signalfor the client. It used to fail with "Marko internal error: analysis marked this template's setup export as empty but translation produced statements for it", or leave the dropped value in setup when the template had other setup work. The server render no longer evaluates an unread<const/s=$signal/>either, which used to throw "Cannot use $signal in a server render." -
Updated dependencies [
13cea0d,6c36c96,05b06d7,70451d2,0878583]:- @marko/compiler@5.42.9