@prisma/client-engine-runtime 6.4.0-dev.37 → 6.4.0-dev.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -290,10 +290,10 @@ var QueryInterpreter = class {
|
|
|
290
290
|
if (!Array.isArray(value)) {
|
|
291
291
|
return value;
|
|
292
292
|
}
|
|
293
|
-
if (value.length
|
|
294
|
-
throw new Error(`Expected
|
|
293
|
+
if (value.length > 1) {
|
|
294
|
+
throw new Error(`Expected zero or one element, got ${value.length}`);
|
|
295
295
|
}
|
|
296
|
-
return value[0];
|
|
296
|
+
return value[0] ?? null;
|
|
297
297
|
}
|
|
298
298
|
case "required": {
|
|
299
299
|
const value = await this.interpretNode(node.args, scope);
|