Przeglądaj źródła

Correctly implement setter

sbkwgh 8 lat temu
rodzic
commit
ebd11ed1d4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      models/post.js

+ 1 - 1
models/post.js

@@ -5,7 +5,7 @@ module.exports = (sequelize, DataTypes) => {
 		content: {
 			type: DataTypes.STRING,
 			set (val) {
-				return marked(val)
+				this.setDataValue('content', marked(val))
 			}
 		}
 	}, {