Skip to content

Commit

Permalink
fix: query.at is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveVanOpstal committed Sep 4, 2017
1 parent 5ab6fd9 commit 18290c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/client/services/picked-items.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ export class PickedItemsService {

private encodeItem(id: number): string {
let msbLocation = Math.floor(id / 64);
let msb = availableChars.at(msbLocation);
let msb = availableChars.charAt(msbLocation);
let lsbLocation = id - (msbLocation * 64);
let lsb = availableChars.at(lsbLocation);
let lsb = availableChars.charAt(lsbLocation);
return msb + lsb;
}

Expand All @@ -111,8 +111,8 @@ export class PickedItemsService {
}

private decodeItem(query: string): number {
let msb = availableChars.indexOf(query.at(0));
let lsb = availableChars.indexOf(query.at(1));
let msb = availableChars.indexOf(query.charAt(0));
let lsb = availableChars.indexOf(query.charAt(1));
return (msb * 64) + lsb;
}

Expand Down

0 comments on commit 18290c8

Please sign in to comment.