Skip to content

Commit d0e2e22

Browse files
author
Lauren McCarthy
committed
closes #854
1 parent 248bbef commit d0e2e22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/io/files.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,8 @@ p5.prototype.save = function(object, _filename, _options) {
883883
// otherwise, parse the arguments
884884

885885
// if first param is a p5Graphics, then saveCanvas
886-
else if (args[0] instanceof p5.Renderer) {
886+
else if (args[0] instanceof p5.Renderer ||
887+
args[0] instanceof p5.Graphics) {
887888
p5.prototype.saveCanvas(args[0].elt, args[1], args[2]);
888889
return;
889890
}

0 commit comments

Comments
 (0)