Skip to content

Commit

Permalink
🆕 replaced required condional statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Tilden committed Sep 28, 2016
1 parent 13a0dc5 commit 98d49f9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/form/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,8 @@ const addRequired = (html, input, index) => {
}

if (input.required === 'save' || inp.required === 'save' || input.required === 'publish' || inp.required === 'publish') {
let level = '';
const required = inp.required || input.required;
if (inp.required !== undefined) {
level += `required--${inp.required}`;
}
else {
level += `required--${input.required}`;
}
const level = `required--${required}`;

// pre-regex strings
const stringClass = 'class=["\'][\\w\\W\\s]+?["\']';
Expand Down

0 comments on commit 98d49f9

Please sign in to comment.