Commit 5951ea0d authored by xjm's avatar xjm
Browse files

Issue #2914713 by droplet, drpal, dawehner, nod_: JS codestyle: no-throw-literal

parent ccde72d3
......@@ -2,7 +2,6 @@
"extends": "./.eslintrc.json",
"rules": {
"no-use-before-define": "off",
"no-throw-literal": "off",
"no-shadow": "off",
"no-restricted-syntax": "off",
"no-new": "off",
......
......@@ -364,7 +364,7 @@
// If there are no elements returned from `entityElementSelector`
// throw an error. Check the browser console for this message.
if (!$entityElement.length) {
throw `Quick Edit could not associate the rendered entity field markup (with [data-quickedit-field-id="${fieldID}"]) with the corresponding rendered entity markup: no parent DOM node found with [data-quickedit-entity-id="${entityID}"]. This is typically caused by the theme's template for this entity type forgetting to print the attributes.`;
throw new Error(`Quick Edit could not associate the rendered entity field markup (with [data-quickedit-field-id="${fieldID}"]) with the corresponding rendered entity markup: no parent DOM node found with [data-quickedit-entity-id="${entityID}"]. This is typically caused by the theme's template for this entity type forgetting to print the attributes.`);
}
let entityElement = $(fieldElement).closest($entityElement);
......
......@@ -162,7 +162,7 @@
var $entityElement = $(entityElementSelector);
if (!$entityElement.length) {
throw 'Quick Edit could not associate the rendered entity field markup (with [data-quickedit-field-id="' + fieldID + '"]) with the corresponding rendered entity markup: no parent DOM node found with [data-quickedit-entity-id="' + entityID + '"]. This is typically caused by the theme\'s template for this entity type forgetting to print the attributes.';
throw new Error('Quick Edit could not associate the rendered entity field markup (with [data-quickedit-field-id="' + fieldID + '"]) with the corresponding rendered entity markup: no parent DOM node found with [data-quickedit-entity-id="' + entityID + '"]. This is typically caused by the theme\'s template for this entity type forgetting to print the attributes.');
}
var entityElement = $(fieldElement).closest($entityElement);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment