Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

Commit 7d58390

Browse files
committed
Merge branch 'fix-es6-in-export-path'
2 parents ed0641f + 318f82e commit 7d58390

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/export-path.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-var */
12
/**
23
* Ensure that a dotted path is defined on a namespace object. Will create
34
* intermediate namespaces that are not defined as empty objects, and will
@@ -8,11 +9,14 @@
89
* @param {*=} value
910
*/
1011
module.exports = function exportPath(namespace, name, value) {
11-
const parts = name.split('.');
12-
let target = namespace;
12+
var parts = name.split('.');
13+
var target = namespace;
1314

14-
for (let i = 0; i < parts.length; i += 1) {
15-
const part = parts[i];
15+
var i;
16+
var part;
17+
18+
for (i = 0; i < parts.length; i += 1) {
19+
part = parts[i];
1620
if (i === parts.length - 1 && value !== undefined) {
1721
target[part] = value;
1822
} else if (target[part]) {

0 commit comments

Comments
 (0)