Prettier fixes
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
var attrState = "data-pjax-state"
|
||||
var attrState = "data-pjax-state";
|
||||
|
||||
module.exports = function(el) {
|
||||
switch (el.tagName.toLowerCase()) {
|
||||
case "a":
|
||||
// only attach link if el does not already have link attached
|
||||
if (!el.hasAttribute(attrState)) {
|
||||
this.attachLink(el)
|
||||
this.attachLink(el);
|
||||
}
|
||||
break
|
||||
break;
|
||||
|
||||
case "form":
|
||||
// only attach link if el does not already have link attached
|
||||
if (!el.hasAttribute(attrState)) {
|
||||
this.attachForm(el)
|
||||
this.attachForm(el);
|
||||
}
|
||||
break
|
||||
break;
|
||||
|
||||
default:
|
||||
throw "Pjax can only be applied on <a> or <form> submit"
|
||||
throw "Pjax can only be applied on <a> or <form> submit";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user