Skip to content

Commit

Permalink
fix(gatsby-transformer-remark): Fix unreturned Promise warning (#12303)
Browse files Browse the repository at this point in the history
* Return null in then

* Return cache.set promise
  • Loading branch information
sidharthachatterjee committed Mar 5, 2019
1 parent 664b66c commit 6f8f2c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-transformer-remark/src/extend-node-type.js
Expand Up @@ -150,8 +150,8 @@ module.exports = (
} else {
const ASTGenerationPromise = getMarkdownAST(markdownNode)
ASTGenerationPromise.then(markdownAST => {
cache.set(cacheKey, markdownAST)
ASTPromiseMap.delete(cacheKey)
return cache.set(cacheKey, markdownAST)
}).catch(err => {
ASTPromiseMap.delete(cacheKey)
return err
Expand Down

0 comments on commit 6f8f2c3

Please sign in to comment.