mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
Fix strip null byte in model should cast to string to use replace function
This commit is contained in:
parent
f55a4b8497
commit
4a1d08c653
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue