@builder.io/mitosis 0.0.142 → 0.0.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,6 +22,7 @@ function addPreventDefault(json) {
|
|
|
22
22
|
if ((_a = node.bindings[key]) === null || _a === void 0 ? void 0 : _a.code.includes('.preventDefault()')) {
|
|
23
23
|
var event_1 = key.slice(2).toLowerCase();
|
|
24
24
|
node.properties['preventdefault:' + event_1] = '';
|
|
25
|
+
node.bindings[key].code = node.bindings[key].code.replace(/.*?\.preventDefault\(\);?/, '').trim();
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -371,6 +371,10 @@ var SrcBuilder = /** @class */ (function () {
|
|
|
371
371
|
if (key === 'dataSet')
|
|
372
372
|
return; // ignore
|
|
373
373
|
if (self.isJSX) {
|
|
374
|
+
if (key.includes(':') && value === '""') {
|
|
375
|
+
self.emit(' ', key);
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
374
378
|
self.emit(' ', key, '=');
|
|
375
379
|
if (typeof value == 'string' && value.startsWith('"') && value.endsWith('"')) {
|
|
376
380
|
self.emit(value);
|