Fix plugin/themes view not updating after reloading content
This commit is contained in:
parent
74d78f4bca
commit
d2cbbd309b
|
@ -245,10 +245,9 @@ export default class {
|
||||||
if (!reload && this.getContentById(content.id))
|
if (!reload && this.getContentById(content.id))
|
||||||
throw {message: `A ${this.contentType} with the ID ${content.id} already exists.`};
|
throw {message: `A ${this.contentType} with the ID ${content.id} already exists.`};
|
||||||
|
|
||||||
if (reload) this.localContent[index] = content;
|
if (reload) this.localContent.splice(index, 1, content);
|
||||||
else this.localContent.push(content);
|
else this.localContent.push(content);
|
||||||
return content;
|
return content;
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue