Commit 06dc6c3f authored by Imran Salam's avatar Imran Salam
Browse files

add protocol to config-url in activate event only if not already defined

parent 70000b75
......@@ -20,7 +20,9 @@ export const updateBrowserActivated = createAction(
export const activateBrowser = (browserEl: HTMLDivElement) => {
return (dispatch: Dispatch) => {
const { protocol } = window.location;
// protocol string to prepend apiHost url in case it isn't defined
const protocol =
config.apiHost.indexOf('http') === -1 ? window.location.protocol : '';
const activateEvent = new CustomEvent('bpane-activate', {
bubbles: true,
detail: {
......@@ -177,6 +179,8 @@ export const fetchExampleObjectsData = () => {
return (dispatch: Dispatch) => {
dispatch(fetchExampleObjects.request(null));
console.log(config.apiHost);
return fetch(`${config.apiHost}/browser/example_objects`)
.then(
(response) => response.json(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment