mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 19:13:49 +01:00
don't fail when null objects are present in d3sketch format
there shouldn’t be null objects
This commit is contained in:
parent
b9ed59c8d9
commit
eb19034e86
@ -28,6 +28,9 @@ export function reviveObject(objects, reviver) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function revive(appVersion, key, value) {
|
function revive(appVersion, key, value) {
|
||||||
|
// Somtimes there are null objects in the d3sketchformat (when saving fails)
|
||||||
|
if (!value) return value;
|
||||||
|
|
||||||
if (semver.lt(appVersion, '0.1.2')) {
|
if (semver.lt(appVersion, '0.1.2')) {
|
||||||
if (key === 'imageData') {
|
if (key === 'imageData') {
|
||||||
return base64ToImage(value);
|
return base64ToImage(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user