Skip to content

Commit 3509a14

Browse files
committed
fix images etc without unpacked content
1 parent 622cca2 commit 3509a14

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/patcher.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,8 @@ function diffImages(a, b, fn) {
134134
async function generateChanges(xnb) {
135135
const target_clean = cleanXnbPath(xnb.target)
136136
const sourceFile = CONTENT_FOLDER.get(target_clean.toLowerCase())
137-
if (sourceFile == null || sourceFile == undefined) return []
138137

139-
if (xnb.file.type == 'Texture2D') { // image
138+
if (sourceFile && xnb.file.type == 'Texture2D') { // image
140139
const xnbFileImage = await blobToImage(xnb.file.content)
141140

142141

@@ -180,7 +179,7 @@ async function generateChanges(xnb) {
180179
}
181180
}
182181

183-
if (xnb.file.type.startsWith('StardewValley')) { // jsonish
182+
if (sourceFile && xnb.file.type.startsWith('StardewValley')) { // jsonish
184183
const xnbFileContent = await blobToString(xnb.file.content)
185184

186185
}
@@ -193,4 +192,4 @@ async function generateChanges(xnb) {
193192
"FromFile": xnb.asset
194193
}
195194
]
196-
}
195+
}

0 commit comments

Comments
 (0)