Skip to content

Commit

Permalink
fix Bus.js bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pudding0803 committed Apr 30, 2023
1 parent 2433be2 commit 934dc21
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 934dc21

Please sign in to comment.