Skip to content

Commit

Permalink
Handle case where MAC address is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
monkbroc committed Jan 26, 2024
1 parent d2fb469 commit efab7e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/address-util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function convertBufferToMacAddress(buffer) {
if (!buffer) {
return buffer;
}

const bytes = Array.from(buffer);
return bytes.map(byte => byte.toString(16).padStart(2, '0')).join(':');
}
Expand Down

0 comments on commit efab7e4

Please sign in to comment.