Fix loading workflow from of edited webp (#764)

* Fix loading workflow from of edited webp

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-09-09 16:07:15 +09:00
committed by GitHub
parent 23796d9040
commit 023299cf1a
9 changed files with 73 additions and 4 deletions

View File

@@ -113,9 +113,11 @@ export function getWebpMetadata(file) {
webp.slice(offset + 8, offset + 8 + chunk_length)
)
for (var key in data) {
var value = data[key] as string
let index = value.indexOf(':')
txt_chunks[value.slice(0, index)] = value.slice(index + 1)
const value = data[key] as string
if (typeof value === 'string') {
const index = value.indexOf(':')
txt_chunks[value.slice(0, index)] = value.slice(index + 1)
}
}
break
}