From c7417809f4036f7800f7d731f4fb9717587447ef Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Sat, 7 May 2022 16:13:22 +0200 Subject: [PATCH] refactor: minor improvement in changelog parsing --- src/renderer/components/ModalSettingsChangelog.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ModalSettingsChangelog.vue b/src/renderer/components/ModalSettingsChangelog.vue index 2a60c0ad..02dcebfe 100644 --- a/src/renderer/components/ModalSettingsChangelog.vue +++ b/src/renderer/components/ModalSettingsChangelog.vue @@ -42,12 +42,16 @@ export default { methods: { async getChangelog () { try { - const apiRes = await fetch(`https://api.github.com/repos/Fabio286/antares/releases/tags/v${this.appVersion}`, { + const apiRes = await fetch(`https://api.github.com/repos/antares-sql/antares/releases/tags/v${this.appVersion}`, { method: 'GET' }); const { body } = await apiRes.json(); - const markdown = body.substr(0, body.indexOf('### Download')); + const cutOffset = body.indexOf('### Download'); + const markdown = cutOffset >= 0 + ? body.substr(0, cutOffset) + : body; + const renderer = { link (href, title, text) { return text;