refactor: replace at function

This commit is contained in:
4gray committed 2022-02-11 23:01:54 +01:00
1 parent b0d368eecb
commit d089e82afa
1 file changed
+2 -1
+2 -1
View File
@@ -201,7 +201,8 @@ export class WhatsNewService {
* Returns modals with latest changes
*/
getLatestChanges(): ModalWindow[] {
const lastVersion = Object.keys(this.modals).at(-1);
const modalsLength = Object.keys(this.modals).length;
const lastVersion = Object.keys(this.modals)[modalsLength - 1];
return this.modals[lastVersion];
}
}