mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Adjust the yoda
ESLint rule to apply to inequalities as well
I happened to notice that some inequalities had the wrong order, and was surprised since I thought that the `yoda` rule should have caught that. However, reading http://eslint.org/docs/rules/yoda#options a bit more closely than previously, it's quite obvious that the `onlyEquality` option does *exactly* what its name suggests. Hence I think that it makes sense to adjust the options such that only ranges are allowed instead.
This commit is contained in:
parent
f0c45f0336
commit
a7c19d9cbb
6 changed files with 31 additions and 29 deletions
|
@ -41,7 +41,7 @@ function onAnimationStart(event) {
|
|||
// invocations have no effect.
|
||||
function watchObjectOrEmbed(elem) {
|
||||
var mimeType = elem.type;
|
||||
if (mimeType && 'application/pdf' !== mimeType.toLowerCase()) {
|
||||
if (mimeType && mimeType.toLowerCase() !== 'application/pdf') {
|
||||
return;
|
||||
}
|
||||
// <embed src> <object data>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue