(const variable is assigned it cannot be assigned again and an attempt to do so will throw an error)
This commit is contained in:
FixError 2018-01-12 00:58:34 +02:00
parent 267c4e1675
commit c5bb2da0a4

View File

@ -457,7 +457,7 @@ module.exports = function(strapi) {
result.value = parseFloat(value); result.value = parseFloat(value);
break; break;
default: default:
result = undefined; return undefined;
} }
return result; return result;
@ -622,7 +622,7 @@ module.exports = function(strapi) {
switch (association.nature) { switch (association.nature) {
case 'oneToOne': case 'oneToOne':
case 'oneToMany': case 'oneToMany':
return this.manageRelations(model, params) return this.manageRelations(model, params);
case 'manyToMany': case 'manyToMany':
return Model.forge({ return Model.forge({
[Model.primaryKey]: parseFloat(params[Model.primaryKey]) [Model.primaryKey]: parseFloat(params[Model.primaryKey])
@ -645,7 +645,7 @@ module.exports = function(strapi) {
switch (association.nature) { switch (association.nature) {
case 'oneToOne': case 'oneToOne':
case 'oneToMany': case 'oneToMany':
return this.manageRelations(model, params) return this.manageRelations(model, params);
case 'manyToMany': case 'manyToMany':
return Model.forge({ return Model.forge({
[Model.primaryKey]: parseFloat(params[Model.primaryKey]) [Model.primaryKey]: parseFloat(params[Model.primaryKey])