diff --git a/js/io/formats/bbmodel.js b/js/io/formats/bbmodel.js index 45e558b7..fa206219 100644 --- a/js/io/formats/bbmodel.js +++ b/js/io/formats/bbmodel.js @@ -526,10 +526,6 @@ var codec = new Codec('project', { c++; tex_copy.id = c.toString(); } - if (isApp && tex.path && fs.existsSync(tex.path) && !model.meta.backup) { - tex_copy.loadContentFromPath(tex.path) - return tex_copy; - } if (isApp && tex.relative_path && path) { let resolved_path = PathModule.resolve(PathModule.dirname(path), tex.relative_path); if (fs.existsSync(resolved_path)) { @@ -537,6 +533,10 @@ var codec = new Codec('project', { return tex_copy; } } + if (isApp && tex.path && fs.existsSync(tex.path) && !model.meta.backup) { + tex_copy.loadContentFromPath(tex.path) + return tex_copy; + } if (tex.source && tex.source.substr(0, 5) == 'data:') { tex_copy.fromDataURL(tex.source) return tex_copy;