Sort Bangs by identifier.
This commit is contained in:
parent
42f5c15826
commit
8b76be1c0f
|
@ -37,7 +37,8 @@ export class PageMain extends Component<Props, State> {
|
||||||
|
|
||||||
const bangs = Object.entries(localStorage)
|
const bangs = Object.entries(localStorage)
|
||||||
.filter(([key, _bang]) => key.startsWith('!'))
|
.filter(([key, _bang]) => key.startsWith('!'))
|
||||||
.map(([_key, bang]) => bang as BangParameters);
|
.map(([_key, bang]) => bang as BangParameters)
|
||||||
|
.sort((a, b) => a.id.localeCompare(b.id));
|
||||||
|
|
||||||
this.setState({bangs: this.state.bangs.concat(bangs)});
|
this.setState({bangs: this.state.bangs.concat(bangs)});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue