mirror of
https://github.com/FortAwesome/Font-Awesome.git
synced 2024-12-26 13:31:30 +08:00
Check for config.observeMutations at runtime for cases when mutation isn't ready and runs to an out of memory error.
This commit is contained in:
parent
516a62816c
commit
cf96c3bcac
@ -1417,6 +1417,9 @@ function observe(options) {
|
|||||||
observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
|
observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
|
||||||
mo = new MUTATION_OBSERVER(function (objects) {
|
mo = new MUTATION_OBSERVER(function (objects) {
|
||||||
if (disabled) return;
|
if (disabled) return;
|
||||||
|
if (!config.observeMutations) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
toArray(objects).forEach(function (mutationRecord) {
|
toArray(objects).forEach(function (mutationRecord) {
|
||||||
if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
|
if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
|
||||||
if (config.searchPseudoElements) {
|
if (config.searchPseudoElements) {
|
||||||
|
Loading…
Reference in New Issue
Block a user