mirror of
https://github.com/strapi/strapi.git
synced 2025-11-14 17:19:01 +00:00
Fix eslint utils
This commit is contained in:
parent
eab835e301
commit
7b9866a770
@ -21,7 +21,7 @@ const getAssociationFromFieldKey = ({ model, field }) => {
|
|||||||
let association;
|
let association;
|
||||||
let attribute;
|
let attribute;
|
||||||
|
|
||||||
for (let i = 0; i < fieldParts.length; i++) {
|
for (let i = 0; i < fieldParts.length; i += 1) {
|
||||||
const part = fieldParts[i];
|
const part = fieldParts[i];
|
||||||
attribute = part;
|
attribute = part;
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ const symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString
|
|||||||
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
|
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
|
||||||
|
|
||||||
function printNumber(val) {
|
function printNumber(val) {
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
if (val != +val) return 'NaN';
|
if (val != +val) return 'NaN';
|
||||||
const isNegativeZero = val === 0 && 1 / val < 0;
|
const isNegativeZero = val === 0 && 1 / val < 0;
|
||||||
return isNegativeZero ? '-0' : `${val}`;
|
return isNegativeZero ? '-0' : `${val}`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user