Skip to content

Commit

Permalink
fix(view): only sync views which are of the same name *and type*
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Jun 6, 2017
1 parent 2a15d1a commit c48da4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/view/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ export class ViewService {
registerUIView(uiView: ActiveUIView) {
trace.traceViewServiceUIViewEvent("-> Registering", uiView);
let uiViews = this._uiViews;
const fqnMatches = uiv => uiv.fqn === uiView.fqn;
if (uiViews.filter(fqnMatches).length)
const fqnAndTypeMatches = (uiv: ActiveUIView) => uiv.fqn === uiView.fqn && uiv.$type === uiView.$type;
if (uiViews.filter(fqnAndTypeMatches).length)
trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:", uiView);

uiViews.push(uiView);
Expand Down

0 comments on commit c48da4a

Please sign in to comment.