diff --git a/ogp.js b/ogp.js
index 88d565d..a0b0308 100644
--- a/ogp.js
+++ b/ogp.js
@@ -53,7 +53,7 @@ class OpenGraph {
}
build() {
- let view = {
+ return Mustache.render(html, {
github,
http: this.http,
@@ -63,15 +63,13 @@ class OpenGraph {
ogtype: this.type.includes('video') ? 'video.other' : 'image',
type: this.type.includes('video') ? 'video' : 'image',
ext: this.type.includes('video') ? '.mp4' : '',
- };
- view.title = (this.title.length != 0) ? `` : '';
- view.description = (this.description.length != 0) ? `` : '';
- view.site = (this.author.length != 0) ? `` : '';
- view.color = (this.color.length != 0) ? `` : '';
- view.card = !this.type.includes('video') ? `` : '';
-
- return Mustache.render(html, view);
+ title: (this.title.length != 0) ? `` : '',
+ description: (this.description.length != 0) ? `` : '',
+ site: (this.author.length != 0) ? `` : '',
+ color: (this.color.length != 0) ? `` : '',
+ card: !this.type.includes('video') ? `` : '',
+ });
}
}