Skip to content

Commit 1ea389a

Browse files
committed
Fixed unsaved file.
1 parent cdcf5aa commit 1ea389a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/av.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,7 +1734,7 @@
17341734
return value.toJSON();
17351735
}
17361736
if (value instanceof AV.File) {
1737-
if (!value.url()) {
1737+
if (!value.url() && !value.id) {
17381738
throw "Tried to save an object containing an unsaved file.";
17391739
}
17401740
return {
@@ -5733,7 +5733,7 @@
57335733
}
57345734

57355735
if (object instanceof AV.File) {
5736-
if (!object.url()) {
5736+
if (!object.url() && !object.id) {
57375737
files.push(object);
57385738
}
57395739
return;

0 commit comments

Comments
 (0)