Commit ae3236b8 authored by flothoni's avatar flothoni
Browse files

model_loader; fix error if analysis.order field is undefined

Link to #4541
parent db18d827
Pipeline #191797 failed with stages
in 43 seconds
......@@ -499,7 +499,11 @@ Model_loader.prototype = {
analysis.stock_order = removeDuplicate(analysis.stock_order)
} else {
// Create new values of stock_order for old analysis files
analysis.stock_order = JSON.parse(JSON.stringify(analysis.order));
if (analysis.order != undefined) {
analysis.stock_order = JSON.parse(JSON.stringify(analysis.order));
} else {
analysis.stock_order = []
}
for (var i = 0; i < analysis.id.length; i++) {
if (analysis.order.indexOf(i) == -1){
analysis.stock_order.push(i)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment