Skip to content
Myr

fix: always use `assign` polyfill

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

authored by aleclarson · committed by aleclarson · parent bd28ceb · Browse files · 2 files+7 added−6 removed
This commit

State

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

Diff stats

2 files+7 added−6 removed

  • other:+7 added−6 removed

2 files+7 added−6 removed

modified:src/common.js+1 added-1 removed
modified:src/proxy.js+6 added-5 removed
1"use strict"2// @ts-check34import {5 is,5 assign,6 each,7 has,8 is,9 isProxyable,10 isProxy,9 PROXY_STATE,11 finalize,12 shallowCopy,12 RETURNED_AND_MODIFIED_ERROR,13 each13 PROXY_STATE,14 RETURNED_AND_MODIFIED_ERROR15} from "./common"1617let proxies = null18
115 unmodified lines
134 if (!state.modified) {135 state.modified = true136 state.copy = shallowCopy(state.base)137 // copy the proxies over the base-copy137 Object.assign(state.copy, state.proxies) // yup that works for arrays as well138 assign(state.copy, state.proxies) // yup that works for arrays as well139 if (state.parent) markChanged(state.parent)140 }141}142
46 unmodified lines