8000 Fix for loop · optimizely/javascript-sdk@990d06c · GitHub
[go: up one dir, main page]

Skip to content

Commit 990d06c

Browse files
committed
Fix for loop
1 parent b071757 commit 990d06c

File tree

1 file changed

+2
-1
lines changed
  • packages/optimizely-sdk/lib/utils/fns

1 file changed

+2
-1
lines changed

packages/optimizely-sdk/lib/utils/fns/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export function assign(target: any, ...sources: any[]): any {
2929
for (let index = 1; index < sources.length; index++) {
3030
const nextSource = sources[index];
3131
if (nextSource !== null && nextSource !== undefined) {
32-
for (const nextKey in nextSource) {
32+
let nextKey;
33+
for (nextKey in nextSource) {
3334
// Avoid bugs when hasOwnProperty is shadowed
3435
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
3536
to[nextKey] = nextSource[nextKey];

0 commit comments

Comments
 (0)
0