🎨 优化

pull/1/head
954270063@qq.com 2020-04-22 09:42:55 +08:00
commit 2eeb0a230e
2 changed files with 28 additions and 8 deletions

21
SECURITY.md Normal file
View File

@ -0,0 +1,21 @@
# Security Policy
## Supported Versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |
## Reporting a Vulnerability
Use this section to tell people how to report a vulnerability.
Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.

View File

@ -2,7 +2,7 @@
* @Author: early-autumn
* @Date: 2020-04-17 12:18:25
* @LastEditors: early-autumn
* @LastEditTime: 2020-04-22 09:25:03
* @LastEditTime: 2020-04-22 09:37:49
*/
import { Adapter, Platform } from './types';
@ -34,14 +34,13 @@ const stack = [
function adaptive(): Adapter | undefined {
let adapter: Adapter | undefined;
try {
const platform = stack.shift();
if (platform === undefined) {
return;
}
// platform() 可能会导致程序进入 catch
try {
adapter = platform();
} catch (err) {}