Skip to content

Commit 18c4372

Browse files
Throw loader exception as Error to prevent Angular issues (#446)
Fixes this https://github.com/angular/angular-cli warning: Syntax Error: NonErrorEmittedError: (Emitted value instead of an instance of Error) Query/mutation names are required for a document with multiple definitions
1 parent cd2f4d0 commit 18c4372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ module.exports = function(source) {
169169
if (op.kind === "OperationDefinition" || op.kind === "FragmentDefinition") {
170170
if (!op.name) {
171171
if (operationCount > 1) {
172-
throw "Query/mutation names are required for a document with multiple definitions";
172+
throw new Error("Query/mutation names are required for a document with multiple definitions");
173173
} else {
174174
continue;
175175
}

0 commit comments

Comments
 (0)