Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
knoxHuang committed Jan 10, 2025
1 parent ce82000 commit 745124d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/inspector/components/sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports.close = close;
const { setHidden, setReadonly, isMultipleInvalid } = require('../utils/prop');

const AUTO_ATLAS_EXTNAME = '.pac';
const ASSET_Dir = join(Editor.Project.path, 'assets');
const ASSET_DIR = join(Editor.Project.path, 'assets');

// Query the automatic atlas with the .pac suffix
async function findAutoAtlasFolder(spriteFrameUuid) {
Expand All @@ -22,7 +22,7 @@ async function findAutoAtlasFolder(spriteFrameUuid) {
}

let dir = dirname(filePath);
while (dir !== ASSET_Dir) {
while (dir !== ASSET_DIR) {
const files = readdirSync(dir);
const file = files.find(file => file.endsWith(AUTO_ATLAS_EXTNAME));
if (file) {
Expand Down

0 comments on commit 745124d

Please sign in to comment.