Skip to content

Commit 4f86f01

Browse files
committed
No more duplicate commands in the sidebar while recording. Fixes #396
1 parent 429a2d9 commit 4f86f01

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: ide/main/src/content/selenium-ide-loader.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ SeleniumIDE.Loader.getEditors = function () {
4545
}
4646
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
4747
var editorWindow = wm.getMostRecentWindow('global:selenium-ide');
48-
if (editorWindow && editorWindow.editor) {
48+
if (editorWindow && editorWindow.editor && editors.indexOf(editorWindow.editor) == -1) {
4949
editors.push(editorWindow.editor);
5050
}
5151
var mainWindow = wm.getMostRecentWindow("navigator:browser");
5252
editor = this.getSidebarEditor(mainWindow.document);
53-
if (editor) {
53+
if (editor && editors.indexOf(editor) == -1) {
5454
editors.push(editor);
5555
}
56+
5657
return editors;
5758
};
5859

0 commit comments

Comments
 (0)