mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 20:31:13 +00:00
Fix grave ReferenceError: fetch is not defined
error (#1460)
* use cross-fetch * remove from utils usage
This commit is contained in:
parent
cda9bd0a79
commit
9fc3da0264
3 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import { initializeSite, isAuthPath } from "@utils/app";
|
||||
import { ErrorPageData } from "@utils/types";
|
||||
import fetch from "cross-fetch";
|
||||
import type { Request, Response } from "express";
|
||||
import { StaticRouter, matchPath } from "inferno-router";
|
||||
import { renderToString } from "inferno-server";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import fetch from "cross-fetch";
|
||||
import type { Request, Response } from "express";
|
||||
import { LemmyHttp } from "lemmy-js-client";
|
||||
import { getHttpBaseExternal, getHttpBaseInternal } from "../../shared/env";
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import fetch from "cross-fetch";
|
||||
|
||||
export async function fetchIconPng(iconUrl: string) {
|
||||
return await fetch(iconUrl)
|
||||
.then(res => res.blob())
|
||||
|
|
Loading…
Reference in a new issue