Skip to content

Commit

Permalink
(fix) Wait for slugify to show up before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
brent-hoover committed Mar 21, 2018
1 parent 2b0c180 commit a3b5cb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/api/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ export function getCurrentTag() {
*/
export function getSlug(slugString) {
let slug;
Promise.resolve(lazyLoadSlugify());
if (slugString && slugify) {
Promise.await(lazyLoadSlugify());
if (slugString) {
slug = slugify(slugString.toLowerCase());
} else {
slug = "";
Expand Down

0 comments on commit a3b5cb5

Please sign in to comment.