Null check on scope and options to ensure backward compatibility

This commit is contained in:
Bjarne Fyrstenborg
2021-03-19 16:57:40 +01:00
committed by Nathan Woulfe
parent 046d6351d2
commit fe8cd239d2

View File

@@ -572,13 +572,15 @@
* Method for opening an item in a list view for editing.
*
* @param {Object} item The item to edit
* @param {Object} scope The scope with options
*/
function editItem(item, scope) {
if (!item.editPath) {
return;
}
if (scope.options.useInfiniteEditor)
if (scope && scope.options && scope.options.useInfiniteEditor)
{
var editorModel = {
id: item.id,