Skip to content

Commit

Permalink
Merge pull request emonney#127 from refactoredmarc/patch-1
Browse files Browse the repository at this point in the history
Fixed error in moveArrayItem
  • Loading branch information
Ebenezer Monney authored Mar 31, 2019
2 parents dcc2fba + 77b73cd commit c6bce34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/QuickApp/ClientApp/src/app/services/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,15 @@ export class Utilities {
public static moveArrayItem(array: any[], oldIndex, newIndex) {

while (oldIndex < 0) {
oldIndex += this.length;
oldIndex += array.length;
}

while (newIndex < 0) {
newIndex += this.length;
newIndex += array.length;
}

if (newIndex >= this.length) {
let k = newIndex - this.length;
if (newIndex >= array.length) {
let k = newIndex - array.length;
while ((k--) + 1) {
array.push(undefined);
}
Expand Down

0 comments on commit c6bce34

Please sign in to comment.