Skip to content

Commit 849e014

Browse files
committed
fix if push config is array
1 parent b7fc5bc commit 849e014

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ParsePushAdapter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ export default class ParsePushAdapter {
5757
}
5858
break;
5959
}
60-
const queue = pushConfig[pushType].queue;
60+
const config = pushConfig[pushType];
61+
const queue = Array.isArray(config) ? config.find(c => c && c.queue)?.queue : config.queue;
6162
if (queue) {
6263
const { concurrency, intervalCapacity, interval } = queue || {};
6364
this.queues[pushType] = new ThrottleQueue({ concurrency, intervalCap: intervalCapacity, interval });

0 commit comments

Comments
 (0)