Explorar el Código

Fix endpoint `false` valued properties

When setting endpoint properties to `false`, the endpoint store module
would not save the value in the request body. This patch makes sure that
even `false` values get into the request body.
Daniel Vincze hace 10 meses
padre
commit
2ea1ea2437
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/plugins/default/ConnectionSchemaPlugin.ts

+ 1 - 1
src/plugins/default/ConnectionSchemaPlugin.ts

@@ -136,7 +136,7 @@ export const fieldsToPayload = (
   const info: any = {};
   const usableSchema: any = schema;
   Object.keys(usableSchema.properties).forEach(fieldName => {
-    if (data[fieldName] && typeof data[fieldName] !== "object") {
+    if (data[fieldName] !== undefined && typeof data[fieldName] !== "object") {
       info[fieldName] = Utils.trim(fieldName, data[fieldName]);
     } else if (typeof usableSchema.properties[fieldName] === "object") {
       const properties =