Closed jedwards1211 closed 4 years ago
async function createUser(args) { const {username, groups} = args const user = await Users.create({username}) .then(user => { if (groups) { return addUserToGroups(user, groups) } else if (foo) { console.log('test') } else if (bar) { console.log('test2') } console.log('blah') return user }) .then(user => { if (groups) { console.log('test') } else { return 'noGroups' } return 'user' }) .catch(err => { console.error(err.stack) return dummyUser() }) }
async function createUser(args) { const {username, groups} = args let user try { const user1 = await Users.create({ username }) const user0 = await (async user => { if (groups) { return addUserToGroups(user, groups) } else if (foo) { console.log('test') } else if (bar) { console.log('test2') } console.log('blah') return user })(user1) if (groups) { console.log('test') user = 'user' } else { user = 'noGroups' } } catch (err) { console.error(err.stack) user = await dummyUser() } }
async function createUser(args) { const {username, groups} = args let user try { let user0 const user1 = await Users.create({ username }) if (groups) { user0 = await addUserToGroups(user1, groups) } else if (foo) { console.log('test') } else if (bar) { console.log('test2') } else { console.log('blah') user0 = await user1 } if (groups) { console.log('test') user = 'user' } else { user = 'noGroups' } } catch (err) { console.error(err.stack) user = await dummyUser() } } `
:tada: This issue has been resolved in version 1.0.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Input
Expected
Actual