Skip to content

Commit 2bf0a22

Browse files
committed
skip hash argument where possible
1 parent 35c5003 commit 2bf0a22

File tree

2 files changed

+1
-3
lines changed
  • packages/svelte/src

2 files changed

+1
-3
lines changed

packages/svelte/src/compiler/phases/3-transform/server/visitors/shared/element.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,6 @@ function build_attr_class(class_directives, expression, context, hash) {
396396
} else {
397397
css_hash = b.literal(hash);
398398
}
399-
} else if (directives) {
400-
css_hash = b.null;
401399
}
402400

403401
return b.call('$.attr_class', expression, css_hash, directives);

packages/svelte/src/internal/server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ function style_object_to_string(style_object) {
286286

287287
/**
288288
* @param {any} value
289-
* @param {string | null} [hash]
289+
* @param {string | undefined} [hash]
290290
* @param {Record<string, boolean>} [directives]
291291
*/
292292
export function attr_class(value, hash, directives) {

0 commit comments

Comments
 (0)