Skip to content

Commit

Permalink
Merge pull request #62 from pudding0803/main
Browse files Browse the repository at this point in the history
fix Bus.js bugs
  • Loading branch information
pudding0803 authored Apr 30, 2023
2 parents 9f656ae + 30905a2 commit a6ad19b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/Bus.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async function afun9025(param) {

async function route(param) {
if (param.buses.toString() === ['9025A'].toString()) return afun9025(param);
if (![['132'], ['133'], ['132', '133'], ['172'], ['173'], ['172', '173']].includes(param.buses)) {
if (![['132'], ['133'], ['132', '133'], ['172'], ['173'], ['172', '173']].some(valid => valid.join() === param.buses.join())) {
throw new Error('Invalid Buses: ' + param.buses.join(' '));
}

Expand Down

0 comments on commit a6ad19b

Please sign in to comment.