diff --git a/src/component/comments/src/gitment.js b/src/component/comments/src/gitment.js index 6bce9f1..b5ae972 100644 --- a/src/component/comments/src/gitment.js +++ b/src/component/comments/src/gitment.js @@ -181,9 +181,9 @@ export default class Gitment { loadMeta() { const { id, owner, repo, gistId, type = 'issues' } = this - if (type === 'gist') { + if (type === 'gists') { return http - .get(`/repos/${owner}/${repo}/${type}/${gistId}`, { + .get(`/${type}/${gistId}`, { creator: owner, }) .then(issue => { diff --git a/src/component/comments/src/theme/default.js b/src/component/comments/src/theme/default.js index c8c3d27..fefed59 100644 --- a/src/component/comments/src/theme/default.js +++ b/src/component/comments/src/theme/default.js @@ -5,7 +5,7 @@ import { } from '../icons' import { NOT_INITIALIZED_ERROR } from '../constants' -function renderHeader({ meta, user, reactions }, instance) { +function renderHeader({ meta, user, reactions = {} }, instance) { const container = document.createElement('div') container.lang = 'en-US' container.className = 'gitment-container gitment-header-container' @@ -52,7 +52,7 @@ function renderHeader({ meta, user, reactions }, instance) { } function renderComments( - { meta, comments, commentReactions, currentPage, user, error }, + { meta, comments, commentReactions = {}, currentPage, user, error }, instance ) { const container = document.createElement('div') @@ -110,8 +110,9 @@ function renderComments( ? ` • edited` : '' } -