One side note, you should pretty much never write function
, particularly for callbacks.
So I'd suggest updating them to use fat arrows, e.g.success: function(media, node) {
becomessuccess: (media, node) => {
One side note, you should pretty much never write function
, particularly for callbacks.
So I'd suggest updating them to use fat arrows, e.g.success: function(media, node) {
becomessuccess: (media, node) => {