Skip to content

Commit 04acf2b

Browse files
Merge pull request #294 from Trucosuso/fix/colors-init-loading-file
Fix init colors requesting a file when receiving an object
2 parents 79d6ca5 + c7c0ec6 commit 04acf2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Colors/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ export const initColors = file => {
5858
return new Promise((resolve, reject) => {
5959
if (typeof file === 'object') {
6060
addColors(file)
61-
resolve()
61+
return resolve()
6262
}
6363
fetch(file)
6464
.then(response => response.json())
6565
.then(json => {
6666
addColors(json)
67-
resolve()
67+
return resolve()
6868
})
6969
.catch(() => {
7070
const error = 'Colors file ' + file + ' not found'
7171
Log.error(error)
72-
reject(error)
72+
return reject(error)
7373
})
7474
})
7575
}

0 commit comments

Comments
 (0)