Skip to content

Commit

Permalink
Don't set up observer in ShadyDOM
Browse files Browse the repository at this point in the history
It won't be used
  • Loading branch information
dfreedm committed Nov 7, 2018
1 parent d290be9 commit 08bc1ff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/mixins/dir-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@ function takeRecords() {
*/
export const DirMixin = dedupingMixin((base) => {

if (!observer) {
getRTL();
observer = new MutationObserver(updateDirection);
observer.observe(document.documentElement, {attributes: true, attributeFilter: ['dir']});
if (!SHIM_SHADOW) {
if (!observer) {
getRTL();
observer = new MutationObserver(updateDirection);
observer.observe(document.documentElement, {attributes: true, attributeFilter: ['dir']});
}
}

/**
Expand Down

0 comments on commit 08bc1ff

Please sign in to comment.