Commit fc7f86b0 authored by flothoni's avatar flothoni Committed by Mikaël Salson
Browse files

model_loader; fix error if analysis.order field is undefined

Link to #4541
parent bcdefeda
......@@ -503,7 +503,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