Fixed #138 - Error: Do not access Object.prototype method

pull/146/head
cagataycivici 2020-01-11 12:18:45 +03:00
parent b5f06bf527
commit cd657d8add
2 changed files with 4 additions and 4 deletions

View File

@ -575,7 +575,7 @@ export default {
let columnField = col.field;
//local
if (this.filters.hasOwnProperty(columnField)) {
if (Object.prototype.hasOwnProperty.call(this.filters, columnField)) {
let filterValue = this.filters[columnField];
let dataFieldValue = ObjectUtils.resolveFieldData(data[i], columnField);
let filterConstraint = FilterUtils[col.filterMatchMode];
@ -1769,7 +1769,7 @@ export default {
return this.filters && Object.keys(this.filters).length > 0 && this.filters.constructor === Object;
},
hasGlobalFilter() {
return this.filters && this.filters.hasOwnProperty('global');
return this.filters && Object.prototype.hasOwnProperty.call(this.filters, 'global');
},
loadingIconClass() {
return ['p-datatable-loading-icon pi-spin', this.loadingIcon];

View File

@ -544,7 +544,7 @@ export default {
let filterField = col.field;
//local
if (this.filters.hasOwnProperty(col.field)) {
if (Object.prototype.hasOwnProperty.call(this.filters, col.field)) {
let filterMatchMode = col.filterMatchMode;
let filterValue = this.filters[col.field];
let filterConstraint = FilterUtils[filterMatchMode];
@ -810,7 +810,7 @@ export default {
return this.filters && Object.keys(this.filters).length > 0 && this.filters.constructor === Object;
},
hasGlobalFilter() {
return this.filters && this.filters.hasOwnProperty('global');
return this.filters && Object.prototype.hasOwnProperty.call(this.filters, 'global');
},
paginatorTop() {
return this.paginator && (this.paginatorPosition !== 'bottom' || this.paginatorPosition === 'both');