mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
21 lines
557 B
TypeScript
21 lines
557 B
TypeScript
import {ROOT_ELEMENT} from 'sentry/constants';
|
|
import Main from 'sentry/main';
|
|
|
|
import {renderDom} from './renderDom';
|
|
|
|
export function renderMain() {
|
|
try {
|
|
renderDom(Main, `#${ROOT_ELEMENT}`);
|
|
} catch (err) {
|
|
if (err.message === 'URI malformed') {
|
|
// eslint-disable-next-line no-console
|
|
console.error(
|
|
new Error(
|
|
'An unencoded "%" has appeared, it is super effective! (See https://github.com/ReactTraining/history/issues/505)'
|
|
)
|
|
);
|
|
window.location.assign(window.location.pathname);
|
|
}
|
|
}
|
|
}
|