mirror of
https://github.com/flarum/core.git
synced 2025-07-27 03:30:28 +02:00
Pass null/falsy values through Model.getIdentifier (#3131)
* Pass null/falsy values through Model.getIdentifier * Add explicit if-return
This commit is contained in:
committed by
GitHub
parent
d8e7aa54b4
commit
497dccee56
@@ -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,
|
||||
|
Reference in New Issue
Block a user