Update WorkflowCollection.js

This commit is contained in:
JAlB- 2023-03-29 02:57:03 +03:00 committed by GitHub
parent 95fcd09ef2
commit b9aa1a5125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,8 +212,7 @@ class OPE{
} }
} }
wc = new WC(qs('body')); DEFAULT_COLLECTIONS = null;
ope = new OPE(qs('body'));
if (lsGet('WorkflowCollection') == null) { if (lsGet('WorkflowCollection') == null) {
fetch('DefaultWorkflows.json') fetch('DefaultWorkflows.json')
@ -227,12 +226,17 @@ if (lsGet('WorkflowCollection') == null) {
// Examine the text in the response // Examine the text in the response
response.json().then(function(data) { response.json().then(function(data) {
DEFAULT_COLLECTIONS = data; DEFAULT_COLLECTIONS = data;
lsSet('WorkflowCollection', jsonEncode(DEFAULT_COLLECTIONS)); console.log('test')
ws.load(); lsSet('WorkflowCollection', jsonEncode(DEFAULT_COLLECTIONS));
wc.load();
}); });
} }
) )
.catch(function(err) { .catch(function(err) {
console.log('Fetch Error :-S', err); console.log('Fetch Error :-S', err);
}); });
} }
wc = new WC(qs('body'));
ope = new OPE(qs('body'));