You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it given that there will always be a prefix, considering this code always slices off the first character in the byte array when parsing, or is it known whether that will be the case beforehand?
I did this as a fail-safe. This is not the exact same context, but you see what I do anyway. Sorry for no use of let etc.
var payload = "";
var first = record.payload[0];
if (first < 32) {
payload = nfcProtocols[first] + nfc.bytesToString(record.payload.slice(1));
} else {
payload = nfc.bytesToString(record.payload);
}
i also noted there are more than 32 elements in the array.
The text was updated successfully, but these errors were encountered:
Is it given that there will always be a prefix, considering this code always slices off the first character in the byte array when parsing, or is it known whether that will be the case beforehand?
I did this as a fail-safe. This is not the exact same context, but you see what I do anyway. Sorry for no use of let etc.
i also noted there are more than 32 elements in the array.
The text was updated successfully, but these errors were encountered: