minor cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-04-29 04:13:42 +03:00
parent 7e4c822933
commit 67d8212f2a

View File

@ -982,7 +982,11 @@ object.Constructor('Page', BasePage, {
// ...seems that we'll fall into recursion on definition... // ...seems that we'll fall into recursion on definition...
slot: function(args, body, state){ slot: function(args, body, state){
var name = args.name var name = args.name
var text = args.text ?? body var text = args.text
?? body
// NOTE: this can't be undefined for .expand(..) to work
// correctly...
?? []
var slots = state.slots = var slots = state.slots =
state.slots state.slots
@ -1000,7 +1004,7 @@ object.Constructor('Page', BasePage, {
// show first instance... // show first instance...
: name in slots) : name in slots)
slots[name] = [...this.__parser__.expand(this, text ?? [], state)] slots[name] = [...this.__parser__.expand(this, text, state)]
return hidden ? return hidden ?
'' ''