From ce9f8f98804473b79f9384fa63150aa4dce72e20 Mon Sep 17 00:00:00 2001 From: David Sevilla Martin <6401250+datitisev@users.noreply.github.com> Date: Mon, 1 Nov 2021 11:16:01 -0400 Subject: [PATCH] Pass null/falsy values through Model.getIdentifier (#3131) * Pass null/falsy values through Model.getIdentifier * Add explicit if-return --- framework/core/js/src/common/Model.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/core/js/src/common/Model.js b/framework/core/js/src/common/Model.js index 270ef5a17..24937f214 100644 --- a/framework/core/js/src/common/Model.js +++ b/framework/core/js/src/common/Model.js @@ -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,