@cicada/render
Advanced tools
Comparing version 1.1.3-alpha1 to 1.1.3-alpha2
@@ -109,5 +109,5 @@ 'use strict'; | ||
}).concat(classList).join(' '); | ||
if (className) ref.className = className; | ||
if (ref.className !== className) ref.className = className; | ||
if (children !== undefined) { | ||
refCache[id].children = ref.innerHTML; | ||
// refCache[id].children = ref.innerHTML | ||
ref.innerHTML = children; | ||
@@ -118,11 +118,7 @@ } | ||
function clearAppearanceRef(id) { | ||
var _ref2 = refCache[id] || {}, | ||
ref = _ref2.ref, | ||
children = _ref2.children; | ||
if (!ref) return; | ||
if (ref.className) ref.className = ref.className.split(/\s+/).filter(function (cls) { | ||
return cls && !prefixReg.test(cls); | ||
}).join(' '); | ||
if (children) ref.innerHTML = children; | ||
/* const { ref, children } = refCache[id] || {} | ||
if (!ref) return | ||
const className = ref.className.split(/\s+/).filter(cls => cls && !prefixReg.test(cls)).join(' ') | ||
if (ref.className !== className) ref.className = className | ||
if (children) ref.innerHTML = children */ | ||
delete refCache[id]; | ||
@@ -200,6 +196,6 @@ } | ||
return { | ||
register: function register(id, _ref3, fn) { | ||
var componentPath = _ref3.path, | ||
_ref3$visible = _ref3.visible, | ||
visible = _ref3$visible === undefined ? true : _ref3$visible; | ||
register: function register(id, _ref2, fn) { | ||
var componentPath = _ref2.path, | ||
_ref2$visible = _ref2.visible, | ||
visible = _ref2$visible === undefined ? true : _ref2$visible; | ||
@@ -206,0 +202,0 @@ var unsubscribe = (0, _util.concat)([subscribeById(id, fn), subscribeById(id, (0, _util.partial)(updateAppearanceRef, id))]); |
{ | ||
"name": "@cicada/render", | ||
"version": "1.1.3-alpha1", | ||
"version": "1.1.3-alpha2", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
338318
8142