优化图片和显示问题
This commit is contained in:
@@ -423,6 +423,13 @@
|
||||
typeof window.soonBindFileMeta === 'function') {
|
||||
window.soonBindFileMeta(cacheKey, { name: hit.meta.name });
|
||||
}
|
||||
// 兜底:design2(背面文件)若缓存里 j.b 缺失,主动补一个空背面结构,
|
||||
// 避免 design2.canvas2.loadFromJSON(undefined) 抛错或吃掉整段加载。
|
||||
if ((hit.json.soonType === 2 || hit.json.backBlackPic || (hit.json.bo && hit.json.bo.length) || (hit.json.f && hit.json.b === undefined && typeof hit.json.b === 'undefined'))) {
|
||||
if (!hit.json.b || typeof hit.json.b !== 'object' || !Array.isArray(hit.json.b.objects)) {
|
||||
hit.json.b = { version: '4.6.0', objects: [], hoverCursor: 'move' };
|
||||
}
|
||||
}
|
||||
return Promise.resolve(hit.json);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user