瀏覽代碼

Non-standard params check in viewer.toJSON

master
Palash Bansal 11 月之前
父節點
當前提交
9fa02f41a2
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      src/viewer/ThreeViewer.ts

+ 2
- 0
src/viewer/ThreeViewer.ts 查看文件

@@ -1164,6 +1164,8 @@ export class ThreeViewer extends EventDispatcher<Record<IViewerEventTypes, IView
* @returns {any} - Serializable JSON object.
*/
toJSON(binary = true, pluginFilter?: string[]): ISerializedViewerConfig {
if (typeof binary !== 'boolean') binary = true // its a meta, ignore it
if (pluginFilter !== undefined && !Array.isArray(pluginFilter)) pluginFilter = undefined // non standard param.
const meta = getEmptyMeta()
const data: ISerializedViewerConfig = Object.assign({
...this._defaultConfig,

Loading…
取消
儲存