Skip to content

Commit

Permalink
fix adding name function name during view validation (2600hz#6521)
Browse files Browse the repository at this point in the history
Adding 1 to `repalce` function so the we add name to the first occurrence
function.
  • Loading branch information
icehess authored May 2, 2020
1 parent 46b8424 commit e29ef15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/validate-js.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def fmap(F, data):

def couchjs(field_js):
(field, js) = field_js
JS = ''.join(js).replace('function', 'function arent_you_funny_couch') + '\n'
JS = ''.join(js).replace('function', 'function arent_you_funny_couch', 1) + '\n'
if 'Object.keys' in JS:
print(field, 'contains "Object.keys" which is not available until ECMA2015')
exit(1)
Expand Down

0 comments on commit e29ef15

Please sign in to comment.