Skip to content

Commit

Permalink
fix: use id as param
Browse files Browse the repository at this point in the history
  • Loading branch information
jsers committed Nov 11, 2022
1 parent dcfa234 commit 8599ff2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion comb_feats.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ fs.writeFileSync(
return `VITE_IS_${feat}=true`;
}),
'\n',
),
) + `\nNODE_ENV=production`,
);
8 changes: 4 additions & 4 deletions src/pages/dashboard/Detail/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ export default function DetailV2({ isPreview = false }: { isPreview?: boolean })
const dashboardConfigs: any = JSONParse(dashboard.configs);
dashboardConfigs.var = value;
// 更新变量配置
b && handleUpdateDashboardConfigs(id, { configs: JSON.stringify(dashboardConfigs) });
b && handleUpdateDashboardConfigs(dashboard.id, { configs: JSON.stringify(dashboardConfigs) });
// 更新变量配置状态
if (valueWithOptions) {
setVariableConfigWithOptions(valueWithOptions);
setDashboardMeta({
dashboardId: id,
dashboardId: _.toString(dashboard.id),
variableConfigWithOptions: valueWithOptions,
});
}
Expand All @@ -149,8 +149,8 @@ export default function DetailV2({ isPreview = false }: { isPreview?: boolean })
}, [id]);

useInterval(() => {
if (import.meta.env.PROD) {
getDashboardPure(id).then((res) => {
if (import.meta.env.PROD && dashboard.id) {
getDashboardPure(_.toString(dashboard.id)).then((res) => {
if (updateAtRef.current && res.update_at > updateAtRef.current) {
if (editable) setEditable(false);
} else {
Expand Down

0 comments on commit 8599ff2

Please sign in to comment.