mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
fix typescript
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8fdb41412f
commit
c044e1a00c
@ -14,8 +14,12 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
interface IParamsObject {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
|
||||||
function searchParamsToObject(params: URLSearchParams) {
|
function searchParamsToObject(params: URLSearchParams) {
|
||||||
return Object.fromEntries([...params.entries()]);
|
return <IParamsObject>Object.fromEntries([...params.entries()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want to support some name / value pairs in the fragment
|
// We want to support some name / value pairs in the fragment
|
||||||
@ -34,7 +38,7 @@ export function parseQsFromFragment(location: Location) {
|
|||||||
|
|
||||||
const result = {
|
const result = {
|
||||||
location: decodeURIComponent(hashparts[0]),
|
location: decodeURIComponent(hashparts[0]),
|
||||||
params: {},
|
params: <IParamsObject>{},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hashparts.length > 1) {
|
if (hashparts.length > 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user