@@ -148,7 +148,7 @@ export function set_custom_element_data(node, prop, value) {
148
148
* @param {Record<string, any> | undefined } prev
149
149
* @param {Record<string, any> } next New attributes - this function mutates this object
150
150
* @param {boolean } lowercase_attributes
151
- * @param {string } css_hash
151
+ * @param {string } [ css_hash]
152
152
* @param {boolean } [skip_warning]
153
153
* @returns {Record<string, any> }
154
154
*/
@@ -162,7 +162,7 @@ export function set_attributes(element, prev, next, lowercase_attributes, css_ha
162
162
}
163
163
}
164
164
165
- if ( css_hash !== '' ) {
165
+ if ( css_hash !== undefined ) {
166
166
next . class = next . class ? next . class + ' ' + css_hash : css_hash ;
167
167
}
168
168
@@ -305,15 +305,15 @@ export function set_attributes(element, prev, next, lowercase_attributes, css_ha
305
305
* @param {Record<string, any> } next The new attributes - this function mutates this object
306
306
* @param {string } [css_hash]
307
307
*/
308
- export function set_dynamic_element_attributes ( node , prev , next , css_hash = '' ) {
308
+ export function set_dynamic_element_attributes ( node , prev , next , css_hash ) {
309
309
if ( node . tagName . includes ( '-' ) ) {
310
310
for ( var key in prev ) {
311
311
if ( ! ( key in next ) ) {
312
312
next [ key ] = null ;
313
313
}
314
314
}
315
315
316
- if ( css_hash !== '' ) {
316
+ if ( css_hash !== undefined ) {
317
317
next . class = next . class ? next . class + ' ' + css_hash : css_hash ;
318
318
}
319
319
0 commit comments