Skip to content

Commit

Permalink
Adds warning about loading inexistant class
Browse files Browse the repository at this point in the history
  • Loading branch information
flovilmart committed Sep 1, 2018
1 parent c314e7c commit 0a5a203
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/graphql/schemas/ParseClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,22 @@ export class ParseClass {
}
this.schema = schema;
this.class = this.schema[className];
if (!this.class) {
/* eslint-disable no-console */
console.warn(`Attempting to load a class (${this.className}) that doesn't exist...`);
console.trace();
/* eslint-enable no-console */
}
}

buildFields(mapper, filterReserved = false, isObject = false) {
if (!this.class) {
/* eslint-disable no-console */
console.warn(`Attempting to build fields a class (${this.className}) that doesn't exist...`);
console.trace();
/* eslint-enable no-console */
return;
}
const fields = this.class.fields;
const initial = {};
if (isObject) {
Expand Down

0 comments on commit 0a5a203

Please sign in to comment.