Skip to content

Commit d973872

Browse files
committed
fix(widget): add optional chaining for lock property access
Added optional chaining operator (?.) to prevent potential errors when accessing the lock property in the update_data_version widget, ensuring safe execution when the updates object or its lock property might be undefined.
1 parent f8c31a9 commit d973872

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/area_maintenance/widgets/update_data_version/js/render_update_data_version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ const get_content_data = async function(self) {
249249
parent : body_response
250250
})
251251
break;
252-
case (updates.lock === true):
252+
case (updates?.lock === true):
253253
break
254254
default:
255255
// create the submit button

0 commit comments

Comments
 (0)