Skip to content

Commit 72e4684

Browse files
bjarnefnul800sebastiaan
authored andcommitted
Null check on scope and options to ensure backward compatibility
(cherry picked from commit fe8cd23)
1 parent acaf194 commit 72e4684

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,13 +572,15 @@
572572
* Method for opening an item in a list view for editing.
573573
*
574574
* @param {Object} item The item to edit
575+
* @param {Object} scope The scope with options
575576
*/
576577
function editItem(item, scope) {
578+
577579
if (!item.editPath) {
578580
return;
579581
}
580582

581-
if (scope.options.useInfiniteEditor)
583+
if (scope && scope.options && scope.options.useInfiniteEditor)
582584
{
583585
var editorModel = {
584586
id: item.id,

0 commit comments

Comments
 (0)