mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 14:52:54 +01:00
Compare commits
1 Commits
feature/im
...
fix/base-u
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0668d0e928 |
@@ -1,21 +1,20 @@
|
|||||||
//this just assumes the base url is '/' always
|
//this just assumes the base url is '/' always
|
||||||
function getAbsoluteUrl(_url) {
|
function getAbsoluteUrl(_url) {
|
||||||
|
|
||||||
//convert to string in case the _url is a Cloud File (which is an object with a custom toString())
|
//convert to string in case the _url is a Cloud File (which is an object with a custom toString())
|
||||||
const url = String(_url);
|
const url = String(_url);
|
||||||
|
|
||||||
//only add a the base url if this is a local URL (e.g. not a https url or base64 string)
|
//only add a the base url if this is a local URL (e.g. not a https url or base64 string)
|
||||||
if (!url || url[0] === "/" || url.includes("://") || url.startsWith('data:')) {
|
if (!url || url[0] === '/' || url.includes('://') || url.startsWith('data:')) {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Noodl.baseUrl || '/') + url;
|
return (Noodl.Env['BaseUrl'] || '/') + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log an error thrown by the JavaScript nodes.
|
* Log an error thrown by the JavaScript nodes.
|
||||||
*
|
*
|
||||||
* @param {any} error
|
* @param {any} error
|
||||||
*/
|
*/
|
||||||
function logJavaScriptNodeError(error) {
|
function logJavaScriptNodeError(error) {
|
||||||
if (typeof error === 'string') {
|
if (typeof error === 'string') {
|
||||||
|
|||||||
Reference in New Issue
Block a user