mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-03 05:28:13 +00:00
hotfix usuwania scenerii & changeloga
This commit is contained in:
@@ -115,7 +115,7 @@ export default defineComponent({
|
||||
async updateListToDb() {
|
||||
try {
|
||||
const mappedChangeList = this.store.changeList.map((v) => {
|
||||
if (/^#/.test(v.id)) {
|
||||
if (/^#/.test(v.id.toString())) {
|
||||
return { ...v, id: undefined };
|
||||
}
|
||||
return { ...v };
|
||||
|
||||
@@ -39,8 +39,8 @@ export default defineComponent({
|
||||
const sceneryId = sceneryData.id;
|
||||
|
||||
// Sceneria niewpisana do bazy danych (id stworzone przez stronę)
|
||||
if (sceneryId.startsWith('#')) {
|
||||
this.store.changeList.filter((item) => item.id != sceneryId);
|
||||
if (sceneryId.toString().startsWith('#')) {
|
||||
this.store.changeList = this.store.changeList.filter((item) => item.id != sceneryId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ export interface SceneryRoutesInfo {
|
||||
}
|
||||
|
||||
export interface SceneryRowItem {
|
||||
id: string;
|
||||
id: string | number;
|
||||
hash: string;
|
||||
name: string;
|
||||
abbr: string;
|
||||
@@ -79,7 +79,7 @@ export interface SceneryRowItem {
|
||||
export type ChangeItem = {
|
||||
[key in ChangeProp]?: any;
|
||||
} & {
|
||||
id: string;
|
||||
id: string | number;
|
||||
name: string;
|
||||
|
||||
toRemove?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user