| Index: mojo/public/tools/bindings/generators/js_templates/union_definition.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/js_templates/union_definition.tmpl b/mojo/public/tools/bindings/generators/js_templates/union_definition.tmpl
|
| index 4823febeca9f20b1ffcfe685962e12ab8f28a570..dde69aeffdaab9344bfd8bc937208680e30462ca 100644
|
| --- a/mojo/public/tools/bindings/generators/js_templates/union_definition.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/js_templates/union_definition.tmpl
|
| @@ -89,7 +89,7 @@ Object.defineProperty({{union.name}}.prototype, "{{field.name}}", {
|
| switch (val.$tag) {
|
| {%- for field in union.fields %}
|
| case {{union.name}}.Tags.{{field.name}}:
|
| -{%- if field|is_bool_field %}
|
| +{%- if field.kind|is_bool_kind %}
|
| encoder.writeUint8(val.{{field.name}} ? 1 : 0);
|
| {%- else %}
|
| encoder.{{field.kind|union_encode_snippet}}val.{{field.name}});
|
| @@ -115,7 +115,7 @@ Object.defineProperty({{union.name}}.prototype, "{{field.name}}", {
|
| switch (tag) {
|
| {%- for field in union.fields %}
|
| case {{union.name}}.Tags.{{field.name}}:
|
| -{%- if field|is_bool_field %}
|
| +{%- if field.kind|is_bool_kind %}
|
| result.{{field.name}} = decoder.readUint8() ? true : false;
|
| {%- else %}
|
| result.{{field.name}} = decoder.{{field.kind|union_decode_snippet}};
|
|
|