Skip to content

Commit

Permalink
Framework: Upgrade ESLint no-nested-ternary to error
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Nov 1, 2016
1 parent f50113d commit 0773516
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module.exports = {
'no-extra-semi': 1,
'no-multiple-empty-lines': [ 1, { max: 1 } ],
'no-multi-spaces': 1,
'no-nested-ternary': 1,
'no-shadow': 1,
'no-spaced-func': 1,
'no-trailing-spaces': 1,
Expand Down
8 changes: 7 additions & 1 deletion client/components/tinymce/plugins/wpcom-autoresize/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ function wcpomAutoResize( editor ) {
// Make sure we have a valid height
if ( isNaN( myHeight ) || myHeight <= 0 ) {
// Get height differently depending on the browser used
myHeight = tinymce.Env.ie ? body.scrollHeight : ( tinymce.Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight );
if ( tinymce.Env.ie ) {
myHeight = body.scrollHeight;
} else if ( tinymce.Env.webkit && body.clientHeight === 0 ) {
myHeight = 0;
} else {
myHeight = body.offsetHeight;
}
}

// Don't make it smaller than the minimum height
Expand Down

0 comments on commit 0773516

Please sign in to comment.