-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
14 changed files
with
89 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## v3.0.4 | ||
[![Downloads](https://img.shields.io/github/downloads/artem-sedykh/mini-humidifier/v3.0.4/total.svg)](https://github.com/artem-sedykh/mini-humidifier/releases/tag/v3.0.4) | ||
|
||
### Fixed | ||
- bug: race condition caused icons not to render by @regevbr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
const buildElementDefinitions = (elements, constructor) => elements.reduce( | ||
(aggregate, element) => { | ||
if (element.defineId) { | ||
// eslint-disable-next-line no-param-reassign | ||
aggregate[element.defineId] = element; | ||
} else { | ||
element.promise.then((clazz) => { | ||
if (constructor.registry.get(element.name) === undefined) { | ||
constructor.registry.define(element.name, clazz); | ||
const buildElementDefinitions = (elements, constructor) => { | ||
const promises = []; | ||
const definitions = elements.reduce( | ||
(aggregate, element) => { | ||
if (typeof element === 'string') { | ||
const clazz = customElements.get(element); | ||
if (clazz) { | ||
// eslint-disable-next-line no-param-reassign | ||
aggregate[element] = clazz; | ||
} else { | ||
promises.push(customElements.whenDefined(element).then(() => { | ||
if (constructor.registry.get(element) === undefined) { | ||
constructor.registry.define(element, customElements.get(element)); | ||
} | ||
})); | ||
} | ||
} else { | ||
// eslint-disable-next-line no-param-reassign | ||
aggregate[element.defineId] = element; | ||
} | ||
return aggregate; | ||
}, {}, | ||
); | ||
// eslint-disable-next-line no-param-reassign | ||
constructor.elementDefinitionsLoaded = promises.length === 0; | ||
if (!constructor.elementDefinitionsLoaded) { | ||
Promise.all(promises) | ||
.then(() => { | ||
// eslint-disable-next-line no-param-reassign | ||
constructor.elementDefinitionsLoaded = true; | ||
}); | ||
} | ||
return aggregate; | ||
}, {}, | ||
); | ||
} | ||
return definitions; | ||
}; | ||
|
||
export default buildElementDefinitions; |
This file was deleted.
Oops, something went wrong.