diff --git a/lib/models/index.js b/lib/models/index.js index a378ee677..95f900b6d 100644 --- a/lib/models/index.js +++ b/lib/models/index.js @@ -23,6 +23,7 @@ if (config.dburl) { // [Postgres] Handling NULL bytes // https://github.com/sequelize/sequelize/issues/6485 function stripNullByte (value) { + value = '' + value return value ? value.replace(/\u0000/g, '') : value } sequelize.stripNullByte = stripNullByte