mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-23 03:53:53 +00:00
fixed getTabByRelPosition
Currently, it's set at <= 0, which means going to previous tab from 2nd tab will result in an error, as it returns null. Changing it to < 0 fixes this issue.
This commit is contained in:
parent
49525b8634
commit
a01a4f00f6
|
@ -228,7 +228,7 @@ class TabGroup extends HTMLElement {
|
||||||
|
|
||||||
getTabByRelPosition(position: number) {
|
getTabByRelPosition(position: number) {
|
||||||
position = this.getActiveTab().getPosition() + position;
|
position = this.getActiveTab().getPosition() + position;
|
||||||
if (position <= 0) {
|
if (position < 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.getTabByPosition(position);
|
return this.getTabByPosition(position);
|
||||||
|
|
Loading…
Reference in a new issue