@marko/translator-default 6.0.16 → 6.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -155,10 +155,10 @@ function _default(path, isNullable) {
155
155
  );
156
156
 
157
157
  if (isNullable) {
158
- writeStartNode = _compiler.types.ifStatement(
159
- name,
160
- writeStartNode,
161
- _compiler.types.expressionStatement(
158
+ writeStartNode = _compiler.types.ifStatement(name, writeStartNode);
159
+
160
+ if (!isEmpty) {
161
+ writeStartNode.alterate = _compiler.types.expressionStatement(
162
162
  _compiler.types.callExpression(
163
163
  _compiler.types.memberExpression(_compiler.types.identifier("out"), _compiler.types.identifier("bf")),
164
164
  [
@@ -167,8 +167,8 @@ function _default(path, isNullable) {
167
167
  _compiler.types.numericLiteral(1)]
168
168
 
169
169
  )
170
- )
171
- );
170
+ );
171
+ }
172
172
  }
173
173
 
174
174
  if (isEmpty) {
@@ -27,10 +27,10 @@ function _default(path, isNullable) {
27
27
  );
28
28
 
29
29
  if (isNullable) {
30
- writeStartNode = _compiler.types.ifStatement(
31
- name,
32
- writeStartNode,
33
- _compiler.types.expressionStatement(
30
+ writeStartNode = _compiler.types.ifStatement(name, writeStartNode);
31
+
32
+ if (!isEmpty) {
33
+ writeStartNode.alternate = _compiler.types.expressionStatement(
34
34
  _compiler.types.callExpression(
35
35
  _compiler.types.memberExpression(_compiler.types.identifier("out"), _compiler.types.identifier("bf")),
36
36
  [
@@ -38,8 +38,8 @@ function _default(path, isNullable) {
38
38
  path.hub.file._componentInstanceIdentifier]
39
39
 
40
40
  )
41
- )
42
- );
41
+ );
42
+ }
43
43
  }
44
44
 
45
45
  if (isEmpty) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/translator-default",
3
- "version": "6.0.16",
3
+ "version": "6.0.17",
4
4
  "description": "Translates Marko templates to the default Marko runtime.",
5
5
  "keywords": [
6
6
  "babel",
@@ -34,8 +34,8 @@
34
34
  "self-closing-tags": "^1.0.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@marko/compiler": "^5.37.15",
38
- "marko": "^5.35.20"
37
+ "@marko/compiler": "^5.37.16",
38
+ "marko": "^5.35.23"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@marko/compiler": "^5.16.1",