fix compatibility: polyfill device storage "getFilesAndDirectories" method
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user