@designcrowd/fe-shared-lib 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -96,18 +96,11 @@ export default {
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
autoFitToContent() {
|
|
99
|
-
// Guard against server-side rendering where document is not available
|
|
100
|
-
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
99
|
setTimeout(() => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const textarea = document.getElementById(`scl-input-${this.id}`);
|
|
100
|
+
const textarea =
|
|
101
|
+
typeof document !== 'undefined' &&
|
|
102
|
+
typeof window !== 'undefined' &&
|
|
103
|
+
document.getElementById(`scl-input-${this.id}`);
|
|
111
104
|
if (textarea) {
|
|
112
105
|
textarea.style.height = 'auto';
|
|
113
106
|
textarea.style.height = `${textarea.scrollHeight}px`;
|