fix: Added linting rule to disable use of object prototypes (#2939)

This commit is contained in:
Wyatt Johnson
2020-04-17 17:12:36 +00:00
committed by GitHub
parent 5b92f7e968
commit 0e9621c499
10 changed files with 70 additions and 57 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export async function mapFieldsetToErrorCodes<T>(
if (err instanceof CoralError) {
// Then loop over all the fieldSpecs...
for (const param in errorMap) {
if (!errorMap.hasOwnProperty(param)) {
if (!Object.prototype.hasOwnProperty.call(errorMap, param)) {
continue;
}
+1 -1
View File
@@ -36,7 +36,7 @@ export function loadPersistedQueries(): PersistedQuery[] {
// Go over each of the persisted queries and collect the ID and query to
// merge in.
for (const id in persistedQueries) {
if (!persistedQueries.hasOwnProperty(id)) {
if (!Object.prototype.hasOwnProperty.call(persistedQueries, id)) {
continue;
}