Skip to content
Myr

fix ie11

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Boldyrev · committed by Andrey Boldyrev · parent ff25a83 · Browse files · 6 files+35 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+35 added−8 removed

  • other:+35 added−8 removed

6 files+35 added−8 removed

modified:src/common.js+4 added-2 removed
140 unmodified lines
141 return x !== x && y !== y142 }143}144145const hasMap = typeof Map !== "undefined"145export const hasSymbol = typeof Symbol !== "undefined"146147export const hasMap = typeof Map !== "undefined"148149export function isMap(target) {150 return hasMap && target instanceof Map151}152151const hasSet = typeof Set !== "undefined"153export const hasSet = typeof Set !== "undefined"154155export function isSet(target) {156 return hasSet && target instanceof Set157}
81 unmodified lines
modified:src/es5.js+3 added-2 removed
6 unmodified lines
7 isDraftable,8 isEnumerable,9 isMap,10 isSet,11 hasSymbol,12 shallowCopy,13 DRAFT_STATE,14 iterateMapValues,15 makeIterable,
144 unmodified lines
160161function proxyMap(target) {162 Object.defineProperties(target, mapTraps)163163 if (typeof Symbol !== undefined) {164 if (hasSymbol) {165 Object.defineProperty(166 target,167 Symbol.iterator,168 proxyMethod(iterateMapValues)
58 unmodified lines
227228function proxySet(target) {229 Object.defineProperties(target, setTraps)230230 if (typeof Symbol !== undefined) {231 if (hasSymbol) {232 Object.defineProperty(233 target,234 Symbol.iterator,235 proxyMethod(iterateSetValues)
233 unmodified lines
modified:src/immer.js+1 added-1 removed
76 unmodified lines
77 // finally instead of catch + rethrow better preserves original stack78 if (hasError) scope.revoke()79 else scope.leave()80 }81 if (result instanceof Promise) {81 if (typeof Promise !== "undefined" && result instanceof Promise) {82 return result.then(83 result => {84 scope.usePatches(patchListener)85 return this.processResult(result, scope)
264 unmodified lines
modified:src/proxy.js+3 added-2 removed
6 unmodified lines
7 isDraftable,8 isDraft,9 isMap,10 isSet,11 hasSymbol,12 shallowCopy,13 makeIterable,14 DRAFT_STATE,15 assignMap,
242 unmodified lines
258 },259 keys: state => () => latest(state).keys(),260 values: iterateMapValues,261 entries: iterateMapValues,261 [Symbol.iterator]: iterateMapValues262 [hasSymbol && Symbol.iterator]: iterateMapValues263})264265const iterateSetValues = makeIterateSetValues(createProxy)266/**
29 unmodified lines
296 },297 keys: iterateSetValues,298 values: iterateSetValues,299 entries: iterateSetValues,299 [Symbol.iterator]: iterateSetValues300 [hasSymbol && Symbol.iterator]: iterateSetValues301})302303/**304 * Helpers
63 unmodified lines
modified:.gitignore+1 added-1 removed
57 unmodified lines
58.env5960.idea61dist/62website/build62website/build
added:index.html+23 added