Skip to content

Commit 3952cd6

Browse files
committed
Bump version
Build didn't get run :/ Now they have
1 parent 884a782 commit 3952cd6

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
lines changed

dist/main.iife.js

+21-3
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,29 @@ var JSXNoReact = (function (exports) {
283283
return createAndAppendSVG.apply(void 0, [tag, attrs].concat(children));
284284
}
285285

286+
var handledAsFunc = typeof tag === 'function' && typeof (tag === null || tag === void 0 ? void 0 : tag.name) === 'string' && (tag === null || tag === void 0 ? void 0 : tag.name) !== 'Fragment';
287+
288+
if (handledAsFunc) {
289+
attrs = attrs || {};
290+
attrs.children = children;
291+
}
292+
286293
var elem = createElement(tag, attrs);
287294

288-
for (var _i3 = 0, _children2 = children; _i3 < _children2.length; _i3++) {
289-
var child = _children2[_i3];
290-
appendChild(elem, child);
295+
if (!handledAsFunc) {
296+
var _iterator2 = _createForOfIteratorHelper(children),
297+
_step2;
298+
299+
try {
300+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
301+
var child = _step2.value;
302+
appendChild(elem, child);
303+
}
304+
} catch (err) {
305+
_iterator2.e(err);
306+
} finally {
307+
_iterator2.f();
308+
}
291309
}
292310

293311
return elem;

dist/module.es6.js

+21-3
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,29 @@ function converter(tag, attrs) {
280280
return createAndAppendSVG.apply(void 0, [tag, attrs].concat(children));
281281
}
282282

283+
var handledAsFunc = typeof tag === 'function' && typeof (tag === null || tag === void 0 ? void 0 : tag.name) === 'string' && (tag === null || tag === void 0 ? void 0 : tag.name) !== 'Fragment';
284+
285+
if (handledAsFunc) {
286+
attrs = attrs || {};
287+
attrs.children = children;
288+
}
289+
283290
var elem = createElement(tag, attrs);
284291

285-
for (var _i3 = 0, _children2 = children; _i3 < _children2.length; _i3++) {
286-
var child = _children2[_i3];
287-
appendChild(elem, child);
292+
if (!handledAsFunc) {
293+
var _iterator2 = _createForOfIteratorHelper(children),
294+
_step2;
295+
296+
try {
297+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
298+
var child = _step2.value;
299+
appendChild(elem, child);
300+
}
301+
} catch (err) {
302+
_iterator2.e(err);
303+
} finally {
304+
_iterator2.f();
305+
}
288306
}
289307

290308
return elem;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsx-standalone",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "Use JSX without React",
55
"repository": "https://github.com/jaredsartin/jsx-standalone",
66
"author": "Jared Sartin <[email protected]>",

0 commit comments

Comments
 (0)