Skip to content

Commit 9dc9066

Browse files
committed
fix: Initiate new form if resource does not contain one
1 parent 38edb3f commit 9dc9066

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/routes/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ export default class IndexRoute extends Route {
4040
await this.fetchGraphs(form !== null);
4141

4242
if (form) {
43-
this.loadForm();
43+
const loadedForm = this.loadForm();
44+
if (!loadedForm) {
45+
this.initiateNewShaclForm();
46+
}
4447
} else {
4548
this.initiateNewShaclForm();
4649
}
@@ -139,6 +142,7 @@ export default class IndexRoute extends Route {
139142
}
140143
console.log('loaded form', this.form);
141144
console.log('loaded supportedClass', this.supportedClass);
145+
return this.form !== undefined;
142146
}
143147

144148
async removeN3RulesFromResource() {

0 commit comments

Comments
 (0)