Skip to content

The code is unreasonable #727

@nagq

Description

@nagq

https://github.com/OSBI/saiku/blob/development/saiku-ui/js/saiku/views/TabSet.js

close_all: function() {
    for (var i = 0, len = this._tabs.length; i < len; i++) {
        var otherTab = this._tabs[i];
        otherTab.remove();
    }
}

should be

close_all: function() {
    for (var len = this._tabs.length, i = len - 1; i >= 0; i--) {
        var otherTab = this._tabs[i];
        otherTab.remove();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions