diff --git a/src-electron/generator/matter/app/zap-templates/common/attributes/Accessors.js b/src-electron/generator/matter/app/zap-templates/common/attributes/Accessors.js index 9457158c95..9635599b29 100644 --- a/src-electron/generator/matter/app/zap-templates/common/attributes/Accessors.js +++ b/src-electron/generator/matter/app/zap-templates/common/attributes/Accessors.js @@ -76,6 +76,8 @@ async function accessorGetterType(attr) { type = `DataModel::Nullable<${type}> &`; } else if (mayNeedPointer) { type = `${type} *`; + } else { + type = `${type} &`; } return type;