Skip to content

Commit c5a72d0

Browse files
Lucian MateescuLucian Mateescu
Lucian Mateescu
authored and
Lucian Mateescu
committed
fixed crash on nonexistend field relation query
1 parent 31e37a6 commit c5a72d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ExportAdapter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ExportAdapter.prototype.loadSchema = function(acceptor) {
105105
ExportAdapter.prototype.redirectClassNameForKey = function(className, key) {
106106
return this.loadSchema().then((schema) => {
107107
var t = schema.getExpectedType(className, key);
108-
var match = t.match(/^relation<(.*)>$/);
108+
var match = t ? t.match(/^relation<(.*)>$/) : false; // if no field exist, undefined.match error thrown
109109
if (match) {
110110
return match[1];
111111
} else {

0 commit comments

Comments
 (0)