We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents df91dcd + 541651c commit cbcd220Copy full SHA for cbcd220
utils/local-ip.ts
@@ -23,7 +23,7 @@ export const getNetworkAddr = async () => {
23
throw new Error('Could not resolve your local adress.')
24
}
25
26
- await Deno.close(ifconfig.rid)
+ await Deno.close?.(ifconfig.rid) ?? ifconfig.close()
27
28
return (
29
addrs &&
@@ -32,7 +32,7 @@ export const getNetworkAddr = async () => {
32
?.split('inet ')[1]
33
)
34
} catch (err) {
35
- ifconfig && (await Deno.close(ifconfig.rid))
+ ifconfig && (await Deno.close?.(ifconfig.rid) ?? ifconfig.close())
36
console.log(err.message)
37
38
0 commit comments