Permalink
Browse files

Add a utility function to look up a model by type and ID

  • Loading branch information...
markerikson committed Jan 22, 2017
1 parent 925d077 commit dc83aebdab9b630c675e0f63e80319b78938752f
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/common/utils/modelUtils.js
@@ -0,0 +1,5 @@
export function getModelByType(session, itemType, itemID) {
const modelClass = session[itemType];
const model = modelClass.withId(itemID);
return model;
}

0 comments on commit dc83aeb

Please sign in to comment.