mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-23 12:06:47 +08:00
[internals] check for string type else return early
This commit is contained in:
@@ -196,6 +196,7 @@ export function noop(): void {}
|
||||
* @returns {*}
|
||||
*/
|
||||
export function stripTrailingSlash(str: string): string {
|
||||
if (!isString(str)) return str;
|
||||
return str.endsWith('/') ? str.slice(0, -1) : str;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user