Skip to content

Commit

Permalink
fix: detect duplicate dummy in loaded sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
soimy committed Feb 1, 2020
1 parent 45d4a56 commit 4bf489c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/atlasify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ export class Atlasify {
s.hash === sheet.hash) {
// deep pixel compare
let diff = pixelMatch(s.data.bitmap.data, sheet.data.bitmap.data, null, s.width, s.height);
if (diff !== 0) continue; // different image
if (diff !== 0) break; // different image
if (s.dummy.includes(sheet.name)) return; // already in dummy list, early exit
// This is the dummy sheet with different name
isNew = false;
s.dummy.push(sheet.name);
Expand Down

0 comments on commit 4bf489c

Please sign in to comment.