fix: url not returned for new docs

This commit is contained in:
Tom Moor committed 2020-11-17 22:49:55 -08:00
1 parent 7c0ddf7efb
commit 4ca2d3776e
1 file changed
+1 -4
+1 -4
View File
@@ -96,10 +96,7 @@ const Document = sequelize.define(
},
getterMethods: {
url: function () {
if (!this.title) {
return;
}
const slugifiedTitle = slugify(this.title);
const slugifiedTitle = slugify(this.title || "untitled");
return `/doc/${slugifiedTitle}-${this.urlId}`;
},
},