Skip to content

Commit 65268c8

Browse files
committed
update format of composition inv numbers
1 parent a3bcd59 commit 65268c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function handle_tram_compositions(cache, data_source) {
2121
const first_wagon_entry = cache.find(entry => entry.inv_number == first_wagon && entry.type == 'tram');
2222
const second_wagon_entry = cache.find(entry => entry.inv_number == second_wagon && entry.type == 'tram');
2323

24-
const composition_inv_number = `${first_wagon}/${second_wagon % 100}`;
24+
const composition_inv_number = `${first_wagon}/${(second_wagon % 100).toString().padStart(2, '0')}`;
2525
const composition_entry = cache.find(entry => entry.inv_number == composition_inv_number);
2626

2727
if(!first_wagon_entry || !second_wagon_entry && data_source == 'avl') {

0 commit comments

Comments
 (0)