Skip to content

Commit 010dba0

Browse files
authored
Update README.md
1 parent 0a82073 commit 010dba0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

worker/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ type ErrorLikeObject = {
3232
const worker = new Worker("https://unpkg.com/css-to-js-sourcemap-worker/worker.js");
3333

3434
worker.onmessage = msg => {
35-
if (msg.id === "render_css" && msg.css) {
35+
const {id, css} = msg.data;
36+
if (id === "render_css" && css) {
3637
const style = document.createElement("style");
37-
style.appendChild(document.createTextNode(msg.css));
38+
style.appendChild(document.createTextNode(css));
3839
document.head.appendChild(style);
3940
}
4041
};

0 commit comments

Comments
 (0)