This commit is contained in:
@@ -659,22 +659,25 @@ export default {
|
||||
// is string replacement for lodash
|
||||
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isString
|
||||
//
|
||||
isString: function(str) {
|
||||
//modified from above, due to bug (I think)
|
||||
//posted case here: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/issues/304
|
||||
if (str == null) {
|
||||
return false;
|
||||
}
|
||||
// isString: function(str) {
|
||||
// //modified from above, due to bug (I think)
|
||||
// //posted case here: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/issues/304
|
||||
// if (str == null) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (str == "") {
|
||||
return true;
|
||||
}
|
||||
let temp = str.valueOf();
|
||||
if (typeof temp === "string") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
// if (str == "") {//another bug, if numeric this is true?! Using recommended method below
|
||||
// return true;
|
||||
// }
|
||||
// let temp = str.valueOf();
|
||||
// if (typeof temp === "string") {
|
||||
// return true;
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
// },
|
||||
isString: function(str) {
|
||||
return str != null && typeof str.valueOf() === "string";
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -164,13 +164,13 @@ export default {
|
||||
save() {
|
||||
let svg = this.$refs.sigCtrl.save("image/svg+xml");
|
||||
if (this.$refs.sigCtrl.isEmpty()) {
|
||||
console.log("IS EMPTY");
|
||||
//console.log("IS EMPTY");
|
||||
svg = null;
|
||||
}
|
||||
this.setSig(svg);
|
||||
this.setCaptured(window.$gz.locale.nowUTC8601String());
|
||||
this.setName(this.tempName);
|
||||
console.log("SVG size IS ", svg == null ? 0 : svg.length);
|
||||
//console.log("SVG size IS ", svg == null ? 0 : svg.length);
|
||||
this.value.isDirty = true;
|
||||
this.pvm.formState.dirty = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user