modify
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
makeit 2024-08-07 14:26:59 +08:00
parent 351351359f
commit b60dce9f0b
4 changed files with 5 additions and 5 deletions

View File

@ -9,8 +9,8 @@ steps:
- name: node_modules_cache
path: /drone/src/node_modules
commands:
- pwd
- node -v
- npm -v
- ls -al
- npm config set registry https://registry.npmmirror.com/
- npm i

View File

@ -150,8 +150,8 @@ class MiCanvas {
} catch (e) {
try {
return this.canvas.toDataURL();
} catch (err) {
console.error(err.message);
} catch (err: any) {
console.error(err?.message);
return '';
}
}

View File

@ -44,7 +44,7 @@ class MiConfig {
public mobile = false;
/** 是否为触摸屏 */
public supportsTouch = ('ontouchstart' in window) || navigator.msMaxTouchPoints;
public supportsTouch = ('ontouchstart' in window) || navigator?.maxTouchPoints;
/** 通用正则 */
public reg: {[index: string]: any} = {

View File

@ -394,7 +394,7 @@
if (elem) elem.remove();
};
if (Text.data && Text.data.content) {
return new Promise((resolve) => {
return new Promise((resolve: any) => {
Text.rendering(
Text.data as MiTextConfig,
true,