@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -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
- // Double-check SSR safety inside the setTimeout callback
106
- if (typeof document === 'undefined' || typeof window === 'undefined') {
107
- return;
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`;