Fix BaseResourceModel.save to not assume that options is non-null.
Review Request #13612 — Created March 5, 2024 and submitted
In the vast majority of cases, calling
save()
on a resource will
either include a caller-providedoptions
object, or will get the
default value from being unspecified. The one case I've found where this
is not the case isBackbone.Collection.create()
, which explicitly
callssave()
on the object with anull
options.This change bullet-proofs that so we don't crash.
Saw that I could use code that called
Collection.create
without it
hitting an error.
Summary | ID |
---|---|
49d8aca06645b12c8a43654be84528aa096be03c |
Description | From | Last Updated |
---|---|---|
You can do options ||= {}; Alternatively, if we only want to do this for null/undefined (rather than falsy values), … |
chipx86 |