We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb36d24 commit 6705c6eCopy full SHA for 6705c6e
1 file changed
src/storage.js
@@ -99,14 +99,8 @@ export const postMessageStorage = (
99
): AsyncStorage => {
100
const request = client(storageWindow, storageOrigin)
101
return {
102
- getItem: async (key: string): Promise<?string> => {
103
- const ret = await request({ method: 'storage/getItem', args: [key] })
104
- if (typeof ret !== 'string') {
105
- throw new Error(
106
- `expected postMessage call for 'storage/getItem' to return a string, but got value ${ret}`
107
- )
108
- }
109
- return ret
+ getItem: (key: string): Promise<?string> => {
+ return request({ method: 'storage/getItem', args: [key] })
110
},
111
112
setItem: (key: string, val: string): Promise<void> => {
0 commit comments