• 
      

    Fix BaseResourceModel.save to not assume that options is non-null.

    Review Request #13612 — Created March 5, 2024 and submitted — Latest diff uploaded

    Information

    Review Board
    release-7.x

    Reviewers

    In the vast majority of cases, calling save() on a resource will
    either include a caller-provided options object, or will get the
    default value from being unspecified. The one case I've found where this
    is not the case is Backbone.Collection.create(), which explicitly
    calls save() on the object with a null 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.

    Commits

    Files