Skip to content

Commit

Permalink
fix(set-style): pass style through htmlSafe
Browse files Browse the repository at this point in the history
  • Loading branch information
velrest committed Aug 19, 2020
1 parent d2dc0e7 commit 3a0d74f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/modifiers/set-style.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { htmlSafe } from "@ember/template";
import { modifier } from "ember-modifier";

export default modifier(function setStyle(element, _, styles) {
Object.entries(styles).forEach(([key, value]) => {
element.style[key] = value;
element.style[key] = htmlSafe(value);
});
});

0 comments on commit 3a0d74f

Please sign in to comment.