Skip to content

Commit

Permalink
fix isNaN import and rebuild min.js
Browse files Browse the repository at this point in the history
  • Loading branch information
eyal0 committed Dec 7, 2017
1 parent bbfb143 commit 8da47a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions octoprint_slicer/static/js/octoprint_slicer.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -36454,9 +36454,9 @@ function OverridesViewModel(parameters, array_keys, enum_keys, item_keys, boolea
}
}

_.forEach(result$$1, function (k) {
_.forEach(result$$1, function (v, k) {
// If the value is undefined, must not be valid for this slicer.
if (result$$1[k] === undefined) {
if (k.startsWith("profile.") && result$$1[k] === undefined) {
delete result$$1[k];
}
});
Expand Down Expand Up @@ -38749,7 +38749,7 @@ function SlicerViewModel(parameters) {
$("#slicer-viewport button#duplicate").click(function (event) {
toggleValueInputs($("#slicer-viewport .more.values div"));
var copies = parseInt(prompt("The number of copies you want to duplicate:", 1));
if (!isNaN(copies)) {
if (!isNaN$1(copies)) {
var originalFilename = self.stlViewPort.selectedModel().userData.filename;
startLongRunning(self.stlViewPort.duplicateSelectedModel.bind(self, copies), function (models) {
forEach$1(models, function (model) {
Expand Down Expand Up @@ -39271,7 +39271,7 @@ function SlicerViewModel(parameters) {
function applyValueInputs(input) {
if (input[0].type == "checkbox" && input[0].id == "lock") {
self.lockScale = input[0].checked;
} else if (input[0].type == "number" && !isNaN(parseFloat(input.val()))) {
} else if (input[0].type == "number" && !isNaN$1(parseFloat(input.val()))) {

var model = self.stlViewPort.selectedModel();
if (model === undefined) return;
Expand Down
2 changes: 1 addition & 1 deletion src/slicer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { OverridesViewModel } from './profile_overrides';
import { ModelArranger } from './ModelArranger';
import { ArrangeModels } from './ArrangeModels';
import { CheckerboardMaterial } from './CheckerboardMaterial';
import { find, forEach, endsWith, some, extend, map, isNan } from 'lodash-es';
import { find, forEach, endsWith, some, extend, map, isNaN } from 'lodash-es';
import { Chop } from './Chop';

function isDev() {
Expand Down

0 comments on commit 8da47a3

Please sign in to comment.