fix compatibility: polyfill device storage "getFilesAndDirectories" method

This commit is contained in:
Mahdi Dibaiee
2015-09-14 00:59:58 +04:30
parent 2b51a7df09
commit d925dfb082
7 changed files with 173 additions and 9 deletions

View File

@ -2,7 +2,7 @@ import store from 'store';
import { show } from 'actions/dialog';
export function type(obj) {
return Object.prototype.toString.call(obj).slice(8, -1);
return obj.toString().slice(8, -1);
}
export function template(string, props) {
@ -26,6 +26,7 @@ export function getKey(object = store.getState().toJS(), key) {
}
export function reportError(err) {
console.error(err);
let action = show('errorDialog', {description: err.message});
store.dispatch(action);
}