Fix exception attempting to create text-only animation
This commit is contained in:
parent
053f3b6589
commit
6f4d67d1a5
5
index.js
5
index.js
|
@ -496,7 +496,10 @@ const linkDetail = (element, filename) => {
|
||||||
const createAnimation = (prop, animation) => {
|
const createAnimation = (prop, animation) => {
|
||||||
const frames = []
|
const frames = []
|
||||||
for (let istate = animation.startState; istate <= animation.endState; istate ++) {
|
for (let istate = animation.startState; istate <= animation.endState; istate ++) {
|
||||||
frames.push(compositeCels(celsFromMask(prop, prop.celmasks[istate])))
|
const frame = compositeCels(celsFromMask(prop, prop.celmasks[istate]))
|
||||||
|
if (frame != null) {
|
||||||
|
frames.push(frame)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (frames.length == 1) {
|
if (frames.length == 1) {
|
||||||
return imageFromCanvas(frames[0].canvas)
|
return imageFromCanvas(frames[0].canvas)
|
||||||
|
|
Loading…
Reference in a new issue