hotfix usuwania scenerii & changeloga

This commit is contained in:
2024-01-04 15:41:42 +01:00
parent c25bd16ab1
commit f7eeaa342a
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ export default defineComponent({
async updateListToDb() { async updateListToDb() {
try { try {
const mappedChangeList = this.store.changeList.map((v) => { const mappedChangeList = this.store.changeList.map((v) => {
if (/^#/.test(v.id)) { if (/^#/.test(v.id.toString())) {
return { ...v, id: undefined }; return { ...v, id: undefined };
} }
return { ...v }; return { ...v };
+2 -2
View File
@@ -39,8 +39,8 @@ export default defineComponent({
const sceneryId = sceneryData.id; const sceneryId = sceneryData.id;
// Sceneria niewpisana do bazy danych (id stworzone przez stronę) // Sceneria niewpisana do bazy danych (id stworzone przez stronę)
if (sceneryId.startsWith('#')) { if (sceneryId.toString().startsWith('#')) {
this.store.changeList.filter((item) => item.id != sceneryId); this.store.changeList = this.store.changeList.filter((item) => item.id != sceneryId);
return; return;
} }
+2 -2
View File
@@ -56,7 +56,7 @@ export interface SceneryRoutesInfo {
} }
export interface SceneryRowItem { export interface SceneryRowItem {
id: string; id: string | number;
hash: string; hash: string;
name: string; name: string;
abbr: string; abbr: string;
@@ -79,7 +79,7 @@ export interface SceneryRowItem {
export type ChangeItem = { export type ChangeItem = {
[key in ChangeProp]?: any; [key in ChangeProp]?: any;
} & { } & {
id: string; id: string | number;
name: string; name: string;
toRemove?: boolean; toRemove?: boolean;