Skip to content

Commit

Permalink
inject-fields fixup for precision and limits
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor authored Mar 28, 2020
1 parent 392a115 commit 890a240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/inject-fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function searchFor (filename) {
sectionLines.length = sectionLines.length - 1
const indent = sectionLines[sectionLines.length - 1].match (/^\s+/)[0].length
for (const missingKey of toAdd) {
sectionLines.push (' '.repeat (indent) + '\'' + missingKey + '\': ' + (missingKey === 'precision' || missingKey === 'limits' ? '{}' : 'undefined') + ',')
sectionLines.push (' '.repeat (indent) + '\'' + missingKey + '\': ' + (missingKey === 'precision' || missingKey === 'limits' ? ('this.' + missingKey) : 'undefined') + ',')
}
sectionLines.push (end)
toInject.push ({top, bottom, sectionLines})
Expand Down

0 comments on commit 890a240

Please sign in to comment.