SyntaxFix
Write A Post
Hire A Developer
Questions
Checking if something is promise unnecessarily complicates the code, just use Promise.resolve
Promise.resolve
Promise.resolve(valueOrPromiseItDoesntMatter).then(function(value) { })