Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
fix(Repository): define variable dataType
  • Loading branch information
RWOverdijk committed Oct 17, 2018
1 parent 0086a0a commit 6c9766319e3984f1b42df664f18f7b87caf2229e
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/repository.js
@@ -229,12 +229,14 @@ export class Repository {
let value = data[key];

if (entityMetadata.has('types', key)) {
const dataType = entityMetadata.fetch('types', key);

if (dataType === 'date' || dataType === 'datetime') {
if (value) {
populatedData[key] = typer.default.cast(value, dataType);
}
} else {
populatedData[key] = typer.cast(value, entityMetadata.fetch('types', key));
populatedData[key] = typer.cast(value, dataType);
}

continue;

0 comments on commit 6c97663

Please sign in to comment.