Fix plugin/themes view not updating after reloading content

This commit is contained in:
Samuel Elliott 2018-03-31 00:50:03 +01:00
parent 74d78f4bca
commit d2cbbd309b
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 1 additions and 2 deletions

View File

@ -245,10 +245,9 @@ export default class {
if (!reload && this.getContentById(content.id))
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);
return content;
} catch (err) {
throw err;
}