1
0
Fork 0

Handle case when action id does not have number at end

Dieser Commit ist enthalten in:
Angus McLeod 2020-04-22 23:08:04 +10:00
Ursprung e06f543720
Commit 77923b443d

Datei anzeigen

@ -77,9 +77,10 @@ export default Component.extend({
let next = 1;
if (items.length) {
next = Math.max.apply(Math, items.map((i) => {
next = Math.max.apply(Math, items.map((i) => {
let parts = i.id.split('_');
return parts[parts.length - 1];
let lastPart = parts[parts.length - 1];
return isNaN(lastPart) ? 0 : lastPart;
})) + 1;
}