Skip to content

Commit

Permalink
fix(users-flow): extract preName from user in default
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed May 24, 2020
1 parent 2e0ad64 commit 38f7482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/@dataflow/extra/users-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export abstract class UsersFlow extends BareFlow<FlowInNode, UsersFlowOutNode> {
public static setAll(data: IUser[]) {
localStorage.setItem('users', JSON.stringify(data));
}
public static set(user: IUser, preName: string = '') {
public static set(user: IUser, preName: string = user.name) {
const data = this.getAll();
for (let i = 0; i < data.length; i++) {
if (preName !== data[i].name) continue;
Expand Down

0 comments on commit 38f7482

Please sign in to comment.