From 6bd5cd448d714b4db97409e2648d30b534dcf637 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Tue, 23 Jul 2024 14:33:08 +0200 Subject: [PATCH] fix(typo): correct typos in comments --- tools/loaders/shared.js | 4 ++-- tools/server/miscellaneous.js | 4 ++-- tools/server/printer.js | 2 +- tools/server/settings.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/loaders/shared.js b/tools/loaders/shared.js index bebfca1a..f01d40a0 100644 --- a/tools/loaders/shared.js +++ b/tools/loaders/shared.js @@ -123,8 +123,8 @@ function getWordsFromHTML(source) { let regex = /data-label=\"(.*?)\"/g let result = source.match(regex); - let extended = false; // also parse template macroses - + let extended = false; // also parse template macros + if (result) { for (let match of result) { // data-label="prop.time-est" let word = match.replace("data-label=", "").trim(); // remove data-label= diff --git a/tools/server/miscellaneous.js b/tools/server/miscellaneous.js index 2ce63e39..ac1fed91 100644 --- a/tools/server/miscellaneous.js +++ b/tools/server/miscellaneous.js @@ -7,7 +7,7 @@ const { ApiError } = require("./mock/errors"); const router = new express.Router(); /** - * version informations + * version information */ router.get("/version", async (req, res, next) => { res.json(req.app.get("printer").version(req.query["system"])); @@ -60,7 +60,7 @@ router.post("/connection", async (req, res, next) => { }); /** - * Retrive a mock of octoprinter printer profile + * Retrieve a mock of octoprinter printer profile */ router.get("/printerprofiles", async (req, res, next) => { res.json(req.app.get("printer").printerProfiles(req)); diff --git a/tools/server/printer.js b/tools/server/printer.js index 2cf4d9f8..44107d2f 100644 --- a/tools/server/printer.js +++ b/tools/server/printer.js @@ -6,7 +6,7 @@ const express = require("express"); const router = new express.Router(); /** - * Retrive the current printer state + * Retrieve the current printer state */ router.get("/", async (req, res, next) => { let include = { diff --git a/tools/server/settings.js b/tools/server/settings.js index 6ee832e8..db83fae4 100644 --- a/tools/server/settings.js +++ b/tools/server/settings.js @@ -86,7 +86,7 @@ router.post("/sn", async (req, res, next) => { return; } - res.status(400).json({ message: "Serial number is not corret" }); + res.status(400).json({ message: "Serial number is not correct" }); }); module.exports = router;