Upgrade @mcschema

This commit is contained in:
Misode
2020-11-07 18:06:16 +01:00
parent 009e487def
commit 97302dbecf
3 changed files with 15 additions and 15 deletions

View File

@@ -34,7 +34,7 @@ export const renderHtml: Hook<[any, Mounter], [string, string, string]> = {
},
choice({ choices, config, switchNode }, path, value, mounter) {
const choice = switchNode.activeCase(path) ?? choices[0]
const choice = switchNode.activeCase(path, true)
const pathWithContext = (config?.context) ?
new ModelPath(path.getModel(), new Path(path.getArray(), [config.context])) : path
const pathWithChoiceContext = config?.choiceContext ? new Path([], [config.choiceContext]) : config?.context ? new Path([], [config.context]) : path