Skip to content

Commit 80c5cbe

Browse files
Use 'indexOf' instead of 'includes' on filePaths array to prevent JS errors in Web UI with Studio when staging files
1 parent b8e9b8c commit 80c5cbe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
22182218
});
22192219

22202220
Object.keys(localStorage).filter(function (key) {
2221-
return !filePaths.includes(key);
2221+
return (filePaths.indexOf(key) === -1);
22222222
}).map(function (key) {
22232223
localStorage.removeItem(key);
22242224
});

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
22182218
});
22192219

22202220
Object.keys(localStorage).filter(function (key) {
2221-
return !filePaths.includes(key);
2221+
return (filePaths.indexOf(key) === -1);
22222222
}).map(function (key) {
22232223
localStorage.removeItem(key);
22242224
});

0 commit comments

Comments
 (0)