@teleporthq/teleport-uidl-resolver
Advanced tools
Comparing version
@@ -138,3 +138,5 @@ "use strict"; | ||
// only do it if there's a child <a> tag and the original element is a navlink | ||
var shouldPassStylesToAnchor = originalElement.style && originalElementType === 'navlink' && anchorChild; | ||
var shouldPassStylesToAnchor = ((originalElement === null || originalElement === void 0 ? void 0 : originalElement.style) || (originalElement === null || originalElement === void 0 ? void 0 : originalElement.referencedStyles)) && | ||
originalElementType === 'navlink' && | ||
anchorChild; | ||
if (shouldPassStylesToAnchor) { | ||
@@ -141,0 +143,0 @@ anchorChild.content.style = teleport_shared_1.UIDLUtils.cloneObject((originalElement === null || originalElement === void 0 ? void 0 : originalElement.style) || {}); |
@@ -128,3 +128,5 @@ var __assign = (this && this.__assign) || function () { | ||
// only do it if there's a child <a> tag and the original element is a navlink | ||
var shouldPassStylesToAnchor = originalElement.style && originalElementType === 'navlink' && anchorChild; | ||
var shouldPassStylesToAnchor = ((originalElement === null || originalElement === void 0 ? void 0 : originalElement.style) || (originalElement === null || originalElement === void 0 ? void 0 : originalElement.referencedStyles)) && | ||
originalElementType === 'navlink' && | ||
anchorChild; | ||
if (shouldPassStylesToAnchor) { | ||
@@ -131,0 +133,0 @@ anchorChild.content.style = UIDLUtils.cloneObject((originalElement === null || originalElement === void 0 ? void 0 : originalElement.style) || {}); |
{ | ||
"name": "@teleporthq/teleport-uidl-resolver", | ||
"version": "0.21.0", | ||
"version": "0.21.3", | ||
"description": "A small package that handles the transition from UIDL to HTML elements and has support for custom mappings.", | ||
@@ -32,3 +32,3 @@ "author": "teleportHQ", | ||
}, | ||
"gitHead": "dd790cfb393fbdb560646eded5a9d6111e43b6ad" | ||
"gitHead": "796745bdddc27689e6d2c5e0442a26fb61486ac4" | ||
} |
@@ -170,3 +170,5 @@ import { UIDLUtils, StringUtils, Constants } from '@teleporthq/teleport-shared' | ||
const shouldPassStylesToAnchor = | ||
originalElement.style && originalElementType === 'navlink' && anchorChild | ||
(originalElement?.style || originalElement?.referencedStyles) && | ||
originalElementType === 'navlink' && | ||
anchorChild | ||
if (shouldPassStylesToAnchor) { | ||
@@ -173,0 +175,0 @@ anchorChild.content.style = UIDLUtils.cloneObject(originalElement?.style || {}) |
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
242434
0.26%3707
0.16%