Refactor code structure for improved readability and maintainability

This commit is contained in:
Harvey Zack committed 2025-06-20 10:26:07 +08:00
1 parent 1374d530a4
commit e2e8e83e63
10 files changed
+17 -17

No files matched your search

+2 -2
View File
@@ -2431,7 +2431,7 @@ function miniMix(art) {
const $mini = createMini();
const top = storage.get('top');
const left = storage.get('left');
if (top && left) {
if (typeof top === 'number' && typeof left === 'number') {
(0, _utils.setStyle)($mini, 'top', `${top}px`);
(0, _utils.setStyle)($mini, 'left', `${left}px`);
if (!(0, _utils.isInViewport)($mini)) initMini();
@@ -4661,7 +4661,7 @@ class Setting extends (0, _componentDefault.default) {
for(let index = 0; index < option.length; index++){
const item = option[index];
if (item?.name) {
(0, _utils.errorHandle)(!names.includes(item.name), `The [${item.name}] is already exist in [setting]`);
(0, _utils.errorHandle)(!names.includes(item.name), `The [${item.name}] already exists in [setting]`);
names.push(item.name);
} else item.name = `setting-${this.id++}`;
if (!item.$formatted) {