Skip to content

Commit a3e50f0

Browse files
committed
Fix infinite loop at get TA retry
1 parent bb954c9 commit a3e50f0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Afip.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,11 @@ Afip.prototype.GetServiceTA = async function(service, firstTry = true) {
156156
sign : taData.credentials.sign
157157
}
158158
}
159-
// Throw error if this is not the first try to get token authorization
160-
else if (firstTry === false){
161-
throw new Error('Error getting Token Autorization');
162-
}
159+
}
160+
161+
// Throw error if this is not the first try to get token authorization
162+
if (firstTry === false){
163+
throw new Error('Error getting Token Autorization');
163164
}
164165

165166
// Create token authorization file

0 commit comments

Comments
 (0)