Pass null/falsy values through Model.getIdentifier (#3131)

* Pass null/falsy values through Model.getIdentifier

* Add explicit if-return
This commit is contained in:
David Sevilla Martin 2021-11-01 11:16:01 -04:00 committed by GitHub
parent e8ffdead39
commit ce9f8f9880

View File

@ -313,6 +313,8 @@ export default class Model {
* @protected
*/
static getIdentifier(model) {
if (!model) return model;
return {
type: model.data.type,
id: model.data.id,