Skip to content

Commit de2babe

Browse files
angi-acsAngi Balanescu
andauthored
fix(ip allowlist): type mismatch (#397)
Co-authored-by: Angi Balanescu <[email protected]>
1 parent d3f826f commit de2babe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ class CloudManagerAPI {
11771177

11781178
async _findIpAllowlist (programId, ipAllowlistId) {
11791179
const ipAllowlists = await this.listIpAllowlists(programId)
1180-
const ipAllowlist = ipAllowlists.find(i => i.id === ipAllowlistId)
1180+
const ipAllowlist = ipAllowlists.find(i => String(i.id) === String(ipAllowlistId))
11811181
if (!ipAllowlist) {
11821182
throw new codes.ERROR_FIND_IP_ALLOWLIST({ messageValues: [ipAllowlistId, programId] })
11831183
}
@@ -1277,7 +1277,7 @@ class CloudManagerAPI {
12771277
*/
12781278
async removeIpAllowlistBinding (programId, ipAllowlistId, environmentId, service) {
12791279
const ipAllowlist = await this._findIpAllowlist(programId, ipAllowlistId)
1280-
let binding = ipAllowlist.bindings.find(b => b.environmentId === environmentId && b.tier === service)
1280+
let binding = ipAllowlist.bindings.find(b => String(b.environmentId) === String(environmentId) && b.tier === service)
12811281
if (!binding) {
12821282
throw new codes.ERROR_FIND_IP_ALLOWLIST_BINDING({ messageValues: [ipAllowlistId, environmentId, service, programId] })
12831283
}

0 commit comments

Comments
 (0)