优化代码

pull/1/head
early-autumn 2020-04-24 09:30:39 +08:00
parent 8b7cd0a912
commit 50ccebec4a
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @Author: early-autumn * @Author: early-autumn
* @Date: 2020-04-17 12:18:25 * @Date: 2020-04-17 12:18:25
* @LastEditors: early-autumn * @LastEditors: early-autumn
* @LastEditTime: 2020-04-23 10:53:50 * @LastEditTime: 2020-04-24 09:30:33
*/ */
import { Adapter, Platform } from './types'; import { Adapter, Platform } from './types';
@ -36,7 +36,7 @@ function adaptive(): Adapter | undefined {
while (stack.length !== 0 && adapter === undefined) { while (stack.length !== 0 && adapter === undefined) {
try { try {
adapter = stack.shift()?.(); adapter = (stack.shift() as Function)();
} catch (err) {} } catch (err) {}
} }