Skip to content

Commit 992907c

Browse files
committed
fix: update the UJS
1 parent 07ff6ad commit 992907c

File tree

3 files changed

+87
-93
lines changed

3 files changed

+87
-93
lines changed

lib/assets/javascripts/react_ujs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,13 +433,11 @@ module.exports = {
433433
module.exports = {
434434
// Turbolinks 5+ got rid of named events (?!)
435435
setup: function(ujs) {
436-
ujs.handleEvent('DOMContentLoaded', ujs.handleMount)
437436
ujs.handleEvent('turbolinks:render', ujs.handleMount)
438437
ujs.handleEvent('turbolinks:before-render', ujs.handleUnmount)
439438
},
440439

441440
teardown: function(ujs) {
442-
ujs.removeEvent('DOMContentLoaded', ujs.handleMount)
443441
ujs.removeEvent('turbolinks:render', ujs.handleMount)
444442
ujs.removeEvent('turbolinks:before-render', ujs.handleUnmount)
445443
},

react_ujs/dist/react_ujs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,13 +433,11 @@ module.exports = {
433433
module.exports = {
434434
// Turbolinks 5+ got rid of named events (?!)
435435
setup: function(ujs) {
436-
ujs.handleEvent('DOMContentLoaded', ujs.handleMount)
437436
ujs.handleEvent('turbolinks:render', ujs.handleMount)
438437
ujs.handleEvent('turbolinks:before-render', ujs.handleUnmount)
439438
},
440439

441440
teardown: function(ujs) {
442-
ujs.removeEvent('DOMContentLoaded', ujs.handleMount)
443441
ujs.removeEvent('turbolinks:render', ujs.handleMount)
444442
ujs.removeEvent('turbolinks:before-render', ujs.handleUnmount)
445443
},

0 commit comments

Comments
 (0)