Use .hasOwnProperty() instead of underscore's equivalent
This commit is contained in:
parent
3e55bd2abb
commit
6e0dc8666d
@ -465,11 +465,14 @@ module.exports = class Histogram extends BaseWidget {
|
||||
}
|
||||
|
||||
_shouldOverride (override) {
|
||||
return override && _.has(override, 'start') && _.has(override, 'end') && _.has(override, 'bins');
|
||||
return override &&
|
||||
override.hasOwnProperty('start') &&
|
||||
override.hasOwnProperty('end') &&
|
||||
override.hasOwnProperty('bins');
|
||||
}
|
||||
|
||||
_shouldOverrideBins (override) {
|
||||
return override && _.has(override, 'bins');
|
||||
return override && override.hasOwnProperty('bins');
|
||||
}
|
||||
|
||||
_buildDateHistogramQuery (psql, override, callback) {
|
||||
@ -499,7 +502,7 @@ module.exports = class Histogram extends BaseWidget {
|
||||
|
||||
var dateBasicsQuery;
|
||||
|
||||
if (override && _.has(override, 'start') && _.has(override, 'end')) {
|
||||
if (override && override.hasOwnProperty('start') && override.hasOwnProperty('end')) {
|
||||
dateBasicsQuery = dateOverrideBasicsQueryTpl({
|
||||
_query: _query,
|
||||
_column: _column,
|
||||
@ -731,4 +734,4 @@ module.exports = class Histogram extends BaseWidget {
|
||||
var offsetInHours = Math.ceil(offset / 3600);
|
||||
return '' + offsetInHours;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user