Skip to content

Commit

Permalink
substitute falsy value with empty string before trying to act on it
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss committed Oct 13, 2019
1 parent 486cd73 commit 761b0f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class ParameterTypeRegistry {
'string',
ParameterTypeRegistry.STRING_REGEXP,
String,
s => s.replace(/\\"/g, '"').replace(/\\'/g, "'"),
s => (s || '').replace(/\\"/g, '"').replace(/\\'/g, "'"),
true,
false
)
Expand Down

0 comments on commit 761b0f1

Please sign in to comment.