Skip to content

Commit 532eaf3

Browse files
committed
fix(privacy-indicator): declare appName to prevent QML crash
In strict mode QML, assigning a value to an undeclared variable throws an "Invalid write to global property" error. This commit adds the missing `var` declaration to `appName` in `Main.qml`'s camera detection loop, fixing a bug where the plugin silently crashed and failed to display the camera indicator.
1 parent 4e6dde8 commit 532eaf3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

privacy-indicator/Main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Item {
5757

5858
var appNames = [];
5959
for (var i = 0; i < apps.length; i++) {
60-
appName = apps[i];
60+
var appName = apps[i];
6161
if (filterRegex && appName && filterRegex.test(appName)) continue;
6262
if (appName && appNames.indexOf(appName) === -1) appNames.push(appName);
6363
}

0 commit comments

Comments
 (0)