But Fixed: Tutorial crashes app when referenced page was not found.

This commit is contained in:
Luis Fernando Molina committed 2021-01-15 13:23:34 +01:00
1 parent 1291917c94
commit b83348c75a
2 files changed
+33 -2

No files matched your search

@@ -9,8 +9,8 @@
"paragraphs": [
{
"style": "Success",
"text": "There is no further action from you required. Someone will review your changes and merge them into the latest version of the software. If your changes are rejected for any reason, you will have to follow the issue at the Github.com web site.",
"updated": 1610478538194
"text": "There is no further action from you required. Someone will review your changes and merge them into the latest version of the software. If your changes are rejected for any reason, you will have to follow the issue at the Github.com web site. ",
"updated": 1610712264828
}
]
}
@@ -1142,6 +1142,37 @@ function newSuperalgosTutorialSpace() {
let schemaDocument = SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(nodeConfig.docs.type)
if (schemaDocument === undefined) {
schemaDocument = {
type: 'Tutorial',
definition: {
text: "You need to reference a page at the docs at the config of this node. Use the docs property for that."
},
icon: {
project: "Superalgos",
name: "warning"
},
paragraphs: [
{
style: "Title",
text: "Example"
},
{
style: "Json",
text: ' \"docs\": { \n' +
'\"project\": \"Superalgos\",\n' +
'\"category\": \"Tutorial\",\n' +
'\"type\": \"Tutorial Step - Bla Bla\"\n' +
'}'
},
{
style: "Note",
text: "If you did, then that page was not found."
},
]
}
}
newConfig = currentNode.config
newDocument = JSON.stringify(schemaDocument) + ' - ' + UI.projects.superalgos.spaces.docsSpace.language