Skip to content

Commit

Permalink
question editor loading: cope with bad variable replacement definition
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Dec 13, 2023
1 parent da46669 commit e05bdec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion editor/static/js/question/edit.js
Expand Up @@ -3667,7 +3667,10 @@ $(document).ready(function() {
load: function(data) {
tryLoad(data,['variable','must_go_first'],this);
var path = data.part;
this.replacement(this.part.q.getPart(data.part).id);
var part = this.part.q.getPart(data.part);
if(part) {
this.replacement(part.id);
}
}
}

Expand Down

0 comments on commit e05bdec

Please sign in to comment.