UNPKG

@mikezimm/fps-core-v7

Version:

Library of reusable core interfaces, types and constants migrated from fps-library-v2

22 lines 1.05 kB
// import { CurrentOrigin } from "../../components/molecules/source-props/WindowLocationConstants"; // import { check4This } from "../Links/CheckSearch"; // /** // * NOTE This only works when the /sites/ you are refering to is in the same tenant // * REPLACED with: makeAbsoluteUrl // * @param relUrl // */ // export function getFullUrlFromSlashSitesUrl(relUrl: string, showConsole: boolean = true): string { // if (relUrl === undefined || relUrl === null) { relUrl = ''; } // let newURL = relUrl + ''; // //Added this to prevent errors in next // if (!relUrl || relUrl.length === 0) { // newURL = ''; // } // if (relUrl.indexOf('/sites/') === 0 || relUrl.indexOf('/teams/') === 0 ) { // // let domain = window.location.href.substr( 0, window.location.href.indexOf('/sites/') ); // newURL = CurrentOrigin + relUrl; // if (check4This('prepSource') === true) { console.log('updated Url to: ', newURL); } // } // return newURL; // } //# sourceMappingURL=getFullUrlFromSlashSitesUrl.js.map