Skip to content

Commit

Permalink
Fix layer_properties template in order to generate valid-flow empty…
Browse files Browse the repository at this point in the history
… PaintProps (#6123)
  • Loading branch information
Jesus89 authored and mourner committed Feb 9, 2018
1 parent adfc154 commit e395884
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/style/style_layer/layer_properties.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ const layout: Properties<LayoutProps> = new Properties({
<% } -%>
});
<% } -%>

<% if(paintProperties.length){ %>
export type PaintProps = {|
<% for (const property of paintProperties) { -%>
"<%= property.name %>": <%- propertyType(property) %>,
<% } -%>
|};

<% } else{ %>
export type PaintProps = {};
<% } %>
const paint: Properties<PaintProps> = new Properties({
<% for (const property of paintProperties) { -%>
"<%= property.name %>": <%- propertyValue(property, 'paint') %>,
Expand Down

0 comments on commit e395884

Please sign in to comment.