Skip to content

Commit

Permalink
fix(data): change order of op and tag in EntityAction type
Browse files Browse the repository at this point in the history
Change the order of EntityOp and tag in the creation of EntityAction
type strings. To ensure ngrx/data actions are exempt from action
immutability run time checks.

BREAKING CHANGES:

EntityAction type strings change format. Any action filters against the
type string instead of the payload values for tag and entityOp values
may not work as expected.

BEFORE:

EntityAction type = `[${tag | entityName}] ${op}`

AFTER:

EntityAction type = `${op} [${tag | entityName}]`
  • Loading branch information
donohoea committed Jul 5, 2021
1 parent af78b68 commit 69cd423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/data/src/actions/entity-action-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class EntityActionFactory {
}

formatActionType(op: string, tag: string) {
return `[${tag}] ${op}`;
return `${op} [${tag}]`;
// return `${op} [${tag}]`.toUpperCase(); // example of an alternative
}
}

0 comments on commit 69cd423

Please sign in to comment.