@annotation-studio/redux
Advanced tools
Comparing version 1.0.0-pr.cbb7e5af to 1.0.0-pr.dfe554f6
@@ -6,2 +6,10 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; | ||
export function getResourceById(state, id) { | ||
if (!id) { | ||
console.warn('Capture model has no ID'); | ||
return null; | ||
} | ||
if (!state.resource.list[id]) { | ||
var newId = '/' + id.split('/').slice(3).join('/'); | ||
return state.resource.list[newId]; | ||
} | ||
return state.resource.list[id]; | ||
@@ -8,0 +16,0 @@ } |
@@ -29,2 +29,10 @@ 'use strict'; | ||
function getResourceById(state, id) { | ||
if (!id) { | ||
console.warn('Capture model has no ID'); | ||
return null; | ||
} | ||
if (!state.resource.list[id]) { | ||
var newId = '/' + id.split('/').slice(3).join('/'); | ||
return state.resource.list[newId]; | ||
} | ||
return state.resource.list[id]; | ||
@@ -31,0 +39,0 @@ } |
{ | ||
"name": "@annotation-studio/redux", | ||
"version": "1.0.0-pr.cbb7e5af", | ||
"version": "1.0.0-pr.dfe554f6", | ||
"description": "Describe annotation-redux here", | ||
@@ -39,3 +39,3 @@ "main": "es/index.js", | ||
"devDependencies": { | ||
"@fesk/test-environment": "^1.0.0-pr.cbb7e5af", | ||
"@fesk/test-environment": "^1.0.0-pr.dfe554f6", | ||
"babel-jest": "^20.0.3", | ||
@@ -42,0 +42,0 @@ "babel-plugin-transform-async-to-generator": "^6.24.1", |
328105
8589