Skip to content

Commit e72b547

Browse files
Update URL.js
1 parent a6665a3 commit e72b547

File tree

1 file changed

+2
-1
lines changed
  • packages/react-native/Libraries/Blob

1 file changed

+2
-1
lines changed

packages/react-native/Libraries/Blob/URL.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ export class URL {
107107
}
108108

109109
get hash(): string {
110-
throw new Error('URL.hash is not implemented');
110+
const hashMatch = this._url.match(/#([^/]*)/);
111+
return hashMatch ? `#${hashMatch[1]}` : '';
111112
}
112113

113114
get host(): string {

0 commit comments

Comments
 (0)