!968 修复:防止旧门板配置报错

pull/968/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent ab8edda3e6
commit ea8098c83d

@ -9,7 +9,7 @@ import { INeedUpdateParams } from "../../Components/Template/TemplateComponent";
import { AppToaster } from "../../Components/Toaster";
import { IUiOption } from "../BoardInterface";
import { BoardStore } from "../BoardStore";
import { IDoorAndDrawerConfigOption, IDoorConfigOption, IDoorInfo, IDrawerInfo, ISelectTempInfo } from "../DoorInterface";
import { IDoorAndDrawerConfigOption, IDoorInfo, IDrawerInfo, ISelectTempInfo } from "../DoorInterface";
const DIVRegExpr = /((\d+(\.\d)?)\*)?D(\*\d+(\.\d)?)?/g;
@ -454,8 +454,10 @@ export class DoorDrawerStore extends BoardStore
{
return CheckoutValid.HasInvailValue(this.UIOption, CheckObjectType.Do);
}
protected UpdateDoorDrawerVersionInfo(cof: IConfigOption<IDoorConfigOption>)
protected UpdateDoorDrawerVersionInfo(cof: IConfigOption<IDoorAndDrawerConfigOption>)
{
if (!cof.doorsInfo) return;
for (let info of cof.doorsInfo)
{
info = info as IDoorDrawer;

@ -42,14 +42,14 @@ export class DrawerStore extends DoorDrawerStore
super.InitOption();
this.InitInfos();
}
UpdateOption(cof: IConfigOption)
UpdateOption(cof: IConfigOption<IDrawerConfigOption>)
{
this.UpdateConfigVersion(cof);
super.UpdateOption(cof);
}
private UpdateConfigVersion(cof: IConfigOption)
private UpdateConfigVersion(cof: IConfigOption<IDrawerConfigOption>)
{
let opt = cof.option as IDrawerConfigOption;
let opt = cof.option;
if (opt && (opt.version === undefined || opt.version < 2))
{
opt.version = 2;

Loading…
Cancel
Save