From a5146e6f387b38a70f0ef830e5896222ad3d7773 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Mon, 29 Apr 2019 15:00:51 -0400 Subject: [PATCH] Remove basetag --- src/App.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/App.js b/src/App.js index 2bd70b798..5b6d5e64e 100644 --- a/src/App.js +++ b/src/App.js @@ -217,27 +217,6 @@ function handleWebWorkerInit(baseDirectory, webWorkScriptsPath) { cornerstoneWADOImageLoader.webWorkerManager.initialize(config) } -/** - * Set or update the HTML Base tag present on the document - * - * @param rootUrl - */ -function updateBaseTag(baseDirectory = '') { - const bases = document.getElementsByTagName('base') - let baseHref = `${window.location.scheme}${ - window.location.host - }${baseDirectory}` - baseHref += baseHref.endsWith('/') ? '' : '/' - - if (bases.length > 1) { - throw new Error('For some reason there is more than one base tag present.') - } else if (bases.length === 1) { - bases[0].href = baseHref - } else { - document.write(``) - } -} - class App extends Component { static propTypes = { routerBasename: PropTypes.string, @@ -262,7 +241,6 @@ class App extends Component { this.props.routerBasename, this.props.relativeWebWorkerScriptsPath ) - updateBaseTag(this.props.routerBasename) } render() {