Fix undefined document when there specifying canvas size.
Fix undefined document when there specifying canvas size.

PaladinStudiosBVs/generator-assets,adobe-photoshop/generator-assets,adobe-photoshop/generator-assets,PaladinStudiosBVs/generator-assets