R
Join ServerReactiflux
help-js
✅ – ✅ – dmikester1 – 21-49 May 1
Can anyone see why this function is returning immediately with
result
being undefined?const handlePartialSubmit = async (e) => {
e.preventDefault();
const result = await updatePalletCountAsync(
lineNum,
false,
lastPalletBagCount === '' ? 0 : lastPalletBagCount
);
console.log({ res2: result });
...
And here is
updatePalletCountAsync
:Can you share it on pastebin or something similar?
Here is the gist. Let me know if you need any other code. Thanks! https://gist.github.com/dmikester1/b4429ec0ff86105a0e0e7b1d562ad4f9
do I need to promisify that second function?
OK, so yes, I did indeed need to promisify that second function!
const updatePalletCountAsync = async (
lineNum,
subtract = false,
partial = 0
) => {
return new Promise(async (resolve, reject) => {
...
3 Messages Not Public
Sign In & Join Server To View