Răsfoiți Sursa

Remove source mapping for dev environment.
Bug fix: Changing unit conversion units was not working on first conversio.

Lee Morgan 4 ani în urmă
părinte
comite
c6622fca3c

+ 0 - 2
app.js

@@ -37,7 +37,6 @@ let esbuildOptions = {
     bundle: true,
     minify: false,
     outfile: "./views/dashboardPage/bundle.js",
-    sourcemap: true
 };
 
 app.use(express.static(__dirname + "/views"));
@@ -63,7 +62,6 @@ if(process.env.NODE_ENV === "production"){
     mongooseOptions.user = "website";
     mongooseOptions.pass = process.env.SUBLINE_DB_PASS;
     esbuildOptions.minify = true;
-    esbuildOptions.sourcemap = false;
 }
 
 mongoose.connect(`mongodb://127.0.0.1:27017/inventory-management`, mongooseOptions);

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
views/dashboardPage/bundle.js.map


+ 3 - 3
views/dashboardPage/js/sidebars/editIngredient.js

@@ -44,21 +44,21 @@ let editIngredient = {
         massDiv.children[1].innerText = (unit === "bottle") ? ingredient.ingredient.altUnit.toUpperCase() : unit.toUpperCase();
         massDiv.children[3].value = parseFloat((ingredient.ingredient.convert.toMass / multiplier).toFixed(3));
         massDiv.children[4].value = "g";
-        massDiv.children[4].previousValue = "g";
+        massDiv.children[4].previousUnit = "g";
         massDiv.children[4].onchange = ()=>{this.changeConversionSelect(massDiv)};
 
         volumeDiv.children[0].value = 1;
         volumeDiv.children[1].innerText = (unit === "bottle") ? ingredient.ingredient.altUnit.toUpperCase() : unit.toUpperCase();
         volumeDiv.children[3].value = parseFloat((ingredient.ingredient.convert.toVolume / multiplier).toFixed(3));
         volumeDiv.children[4].value = "l";
-        volumeDiv.children[4].previousValue = "l";
+        volumeDiv.children[4].previousUnit = "l";
         volumeDiv.children[4].onchange = ()=>{this.changeConversionSelect(volumeDiv)};
 
         lengthDiv.children[0].value = 1;
         lengthDiv.children[1].innerText = (unit === "bottle") ? ingredient.ingredient.altUnit.toUpperCase() : unit.toUpperCase();
         lengthDiv.children[3].value = parseFloat((ingredient.ingredient.convert.toLength / multiplier).toFixed(3));
         lengthDiv.children[4].value = "m";
-        lengthDiv.children[4].previousValue = "m";
+        lengthDiv.children[4].previousUnit = "m";
         lengthDiv.children[4].onchange = ()=>{this.changeConversionSelect(lengthDiv)};
 
         switch(controller.getBaseUnit(unit)){

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff