mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
frontend linting
This commit is contained in:
@@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import additionalData from './index';
|
||||
import additionalData from "./index";
|
||||
|
||||
it('sudo form works', () => {
|
||||
it("sudo form works", () => {
|
||||
try {
|
||||
additionalData();
|
||||
} catch (e) {
|
||||
@@ -26,8 +26,8 @@ it('sudo form works', () => {
|
||||
);
|
||||
}
|
||||
|
||||
const element = document.createElement('div');
|
||||
element.id = 'additional-data';
|
||||
const element = document.createElement("div");
|
||||
element.id = "additional-data";
|
||||
document.body.appendChild(element);
|
||||
expect(additionalData()).toBe(element);
|
||||
});
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const additionalData = () => {
|
||||
const additionalData = (): HTMLElement => {
|
||||
let element = null;
|
||||
const ID = 'additional-data';
|
||||
const ID = "additional-data";
|
||||
|
||||
if (element === null) {
|
||||
element = <HTMLElement>document.getElementById(ID);
|
||||
@@ -29,7 +29,7 @@ const additionalData = () => {
|
||||
return element;
|
||||
}
|
||||
} else {
|
||||
element;
|
||||
return element;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user