openreplay/frontend/app/init/immutable.js
2021-05-01 15:12:01 +05:30

11 lines
337 B
JavaScript

import { Record } from 'immutable';
Record.prototype.exists = function exists() {
const idKey = this.idKey || 'id';
return this[ idKey ] !== undefined && this[ idKey ] !== '';
};
Record.prototype.validate = () => true;
Record.prototype.isComplete = () => true;
Record.prototype.toData = function toData() {
return this.toJS();
};