Skip to content
Snippets Groups Projects
Commit ca0f91f4 authored by Igor Markin's avatar Igor Markin
Browse files

Merge branch 'do-no-throw-rka-error' into 'master'

Do no throw rka error

See merge request light/clients/utils!45
parents edd325d2 a9cae5df
No related branches found
No related tags found
1 merge request!45Do no throw rka error
......@@ -56,7 +56,7 @@ exports.findRKASubstring = (string, rabinFingerprint, substringSize) => {
}
const startingIndex = searchFingerprintInText(string, rabinFingerprint, substringSize);
if (startingIndex === -1) {
throw new Error("Unable to find RKA substring");
return "";
}
return string.slice(startingIndex, startingIndex + substringSize);
};
......
......@@ -105,7 +105,7 @@ export const findRKASubstring = (
);
if (startingIndex === -1) {
throw new Error("Unable to find RKA substring");
return "";
}
return string.slice(startingIndex, startingIndex + substringSize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment