Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
kzkn committed Nov 23, 2022
1 parent 11cd53f commit b159c49
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions app/assets/javascripts/turbo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3949,7 +3949,7 @@ var turbo_es2017Esm = Object.freeze({
let consumer;

async function getConsumer() {
return consumer || setConsumer(createConsumer().then(setConsumer));
return consumer || setConsumer(await createConsumer());
}

function setConsumer(newConsumer) {
Expand Down Expand Up @@ -3981,7 +3981,7 @@ function walk(obj) {
if (obj instanceof Date || obj instanceof RegExp) return obj;
if (Array.isArray(obj)) return obj.map(walk);
return Object.keys(obj).reduce((function(acc, key) {
var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, (function(m, x) {
var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, (function(_m, x) {
return "_" + x.toLowerCase();
}));
acc[camel] = walk(obj[key]);
Expand Down Expand Up @@ -4009,13 +4009,10 @@ class TurboCableStreamSourceElement extends HTMLElement {
get channel() {
const channel = this.getAttribute("channel");
const signed_stream_name = this.getAttribute("signed-stream-name");
return {
return Object.assign({
channel: channel,
signed_stream_name: signed_stream_name,
...walk({
...this.dataset
})
};
signed_stream_name: signed_stream_name
}, walk(Object.assign({}, this.dataset)));
}
}

Expand Down
Loading

0 comments on commit b159c49

Please sign in to comment.