@teleporthq/teleport-uidl-resolver
Advanced tools
Comparing version
@@ -306,2 +306,11 @@ "use strict"; | ||
: staticContent.match(/\((.*?)\)/)[1].replace(/('|")/g, ''); | ||
/* | ||
background image such as gradient shouldn't be urls | ||
we prevent that by checking if the value is actually an asset or not (same check as in the prefixAssetsPath function | ||
but we don't compute and generate a url) | ||
*/ | ||
if (!asset.startsWith('/')) { | ||
acc[styleKey] = styleValue; | ||
return acc; | ||
} | ||
var url = teleport_shared_1.UIDLUtils.prefixAssetsPath(asset, assets); | ||
@@ -308,0 +317,0 @@ var newStyleValue = "url(\"".concat(url, "\")"); |
@@ -291,2 +291,11 @@ var __assign = (this && this.__assign) || function () { | ||
: staticContent.match(/\((.*?)\)/)[1].replace(/('|")/g, ''); | ||
/* | ||
background image such as gradient shouldn't be urls | ||
we prevent that by checking if the value is actually an asset or not (same check as in the prefixAssetsPath function | ||
but we don't compute and generate a url) | ||
*/ | ||
if (!asset.startsWith('/')) { | ||
acc[styleKey] = styleValue; | ||
return acc; | ||
} | ||
var url = UIDLUtils.prefixAssetsPath(asset, assets); | ||
@@ -293,0 +302,0 @@ var newStyleValue = "url(\"".concat(url, "\")"); |
{ | ||
"name": "@teleporthq/teleport-uidl-resolver", | ||
"version": "0.27.1", | ||
"version": "0.27.2", | ||
"description": "A small package that handles the transition from UIDL to HTML elements and has support for custom mappings.", | ||
@@ -27,3 +27,3 @@ "author": "teleportHQ", | ||
"dependencies": { | ||
"@teleporthq/teleport-shared": "^0.27.1", | ||
"@teleporthq/teleport-shared": "^0.27.2", | ||
"@teleporthq/teleport-types": "^0.27.0", | ||
@@ -33,3 +33,3 @@ "@teleporthq/teleport-uidl-builders": "^0.27.0", | ||
}, | ||
"gitHead": "82a3f3a6c78a35d716c1ce10bda5fce20a26b5c3" | ||
"gitHead": "53c7b8a9ffbe8e18341da464580e08f5292c3f00" | ||
} |
@@ -372,2 +372,13 @@ import { UIDLUtils, StringUtils } from '@teleporthq/teleport-shared' | ||
: staticContent.match(/\((.*?)\)/)[1].replace(/('|")/g, '') | ||
/* | ||
background image such as gradient shouldn't be urls | ||
we prevent that by checking if the value is actually an asset or not (same check as in the prefixAssetsPath function | ||
but we don't compute and generate a url) | ||
*/ | ||
if (!asset.startsWith('/')) { | ||
acc[styleKey] = styleValue | ||
return acc | ||
} | ||
const url = UIDLUtils.prefixAssetsPath(asset, assets) | ||
@@ -374,0 +385,0 @@ const newStyleValue = `url("${url}")` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
293014
0.56%4309
0.63%