Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember data remove deprecation Ember Promise Many Array behaviors #28652

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export default class MfaMethodCreateController extends Controller {
// first save method
yield this.method.save();
if (this.enforcement) {
// mfa_methods is type PromiseManyArray so slice in necessary to convert it to an Array
this.enforcement.mfa_methods = addToArray(this.enforcement.mfa_methods.slice(), this.method);
// mfa_methods is type PromiseManyArray. Array methods like slice are no longer allowed on PromiseManyArray. We must yield the promise first, then call the method.
const mfaMethods = yield this.enforcement.mfa_methods;
this.enforcement.mfa_methods = addToArray(mfaMethods.slice(), this.method);
try {
// now save enforcement and catch error separately
yield this.enforcement.save();
Expand Down
5 changes: 1 addition & 4 deletions ui/config/deprecation-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ self.deprecationWorkflow.config = {

self.deprecationWorkflow.config = {
// current output from deprecationWorkflow.flushDeprecations();
workflow: [
// ember-data
{ handler: 'silence', matchId: 'ember-data:deprecate-promise-many-array-behaviors' }, // MFA
],
workflow: [],
};
Loading