Skip to content

Commit

Permalink
refactor: remove parallel ifs from def.$data partial
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Jul 18, 2016
1 parent caf7557 commit ab4f658
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/dot/definitions.def
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@

{{## def.$data:
{{
var $isData = it.opts.v5 && $schema.$data;
var $schemaValue = $isData
? it.util.getData($schema.$data, $dataLvl, it.dataPathArr)
: $schema;
var $isData = it.opts.v5 && $schema.$data
, $schemaValue;
}}
{{? $isData }}
var schema{{=$lvl}} = {{=$schemaValue}};
var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }};
{{ $schemaValue = 'schema' + $lvl; }}
{{??}}
{{ $schemaValue = $schema; }}
{{?}}
#}}

Expand Down

0 comments on commit ab4f658

Please sign in to comment.