diff --git a/package-lock.json b/package-lock.json
index 86f7dd4..c1f5204 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4964,7 +4964,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -5379,7 +5380,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -5435,6 +5437,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -5478,12 +5481,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
}
}
},
diff --git a/projects/angular-contenteditable-accessor/src/lib/contenteditable-value-accessor.ts b/projects/angular-contenteditable-accessor/src/lib/contenteditable-value-accessor.ts
index fb72a9f..e80ed65 100644
--- a/projects/angular-contenteditable-accessor/src/lib/contenteditable-value-accessor.ts
+++ b/projects/angular-contenteditable-accessor/src/lib/contenteditable-value-accessor.ts
@@ -147,13 +147,12 @@ export class ContenteditableValueAccessor
}
/*
- * null and other falsy control values are treated as empty string to
- * prevent IE11 outputting 'null', also single
is replaced with empty
- * string when passed to the control
+ * null is treated as empty string to prevent IE11 outputting 'null',
+ * also single
is replaced with empty string when passed to the control
*/
- private static processValue(value: string | null): string {
- const processed = value || '';
+ private static processValue(value: unknown): string {
+ const processed = String(value == null ? '' : value);
- return processed.toString().trim() === '
' ? '' : processed;
+ return processed.trim() === '
' ? '' : processed;
}
}