Skip to content

Commit

Permalink
Make unsupported browser check asynchronous
Browse files Browse the repository at this point in the history
This check is very expensive, and will pass almost 100% of the time.

Related #36728
Depends on #38329

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
  • Loading branch information
pulsejet committed May 17, 2023
1 parent 1ce8fc6 commit 8ce156d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/unsupported-browser-redirect.js
Expand Up @@ -19,8 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import { testSupportedBrowser } from './utils/RedirectUnsupportedBrowsers.js'

if (!window.TESTING && !OC?.config?.no_unsupported_browser_warning) {
testSupportedBrowser()
window.addEventListener('DOMContentLoaded', async function() {
const { testSupportedBrowser } = await import('./utils/RedirectUnsupportedBrowsers.js')
testSupportedBrowser()
})
}

0 comments on commit 8ce156d

Please sign in to comment.