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) {
|
_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) {
|
_shouldOverrideBins (override) {
|
||||||
return override && _.has(override, 'bins');
|
return override && override.hasOwnProperty('bins');
|
||||||
}
|
}
|
||||||
|
|
||||||
_buildDateHistogramQuery (psql, override, callback) {
|
_buildDateHistogramQuery (psql, override, callback) {
|
||||||
@ -499,7 +502,7 @@ module.exports = class Histogram extends BaseWidget {
|
|||||||
|
|
||||||
var dateBasicsQuery;
|
var dateBasicsQuery;
|
||||||
|
|
||||||
if (override && _.has(override, 'start') && _.has(override, 'end')) {
|
if (override && override.hasOwnProperty('start') && override.hasOwnProperty('end')) {
|
||||||
dateBasicsQuery = dateOverrideBasicsQueryTpl({
|
dateBasicsQuery = dateOverrideBasicsQueryTpl({
|
||||||
_query: _query,
|
_query: _query,
|
||||||
_column: _column,
|
_column: _column,
|
||||||
@ -731,4 +734,4 @@ module.exports = class Histogram extends BaseWidget {
|
|||||||
var offsetInHours = Math.ceil(offset / 3600);
|
var offsetInHours = Math.ceil(offset / 3600);
|
||||||
return '' + offsetInHours;
|
return '' + offsetInHours;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user