Skip to content

Commit

Permalink
fix: id undefined (#17092)
Browse files Browse the repository at this point in the history
Fixes #17091
  • Loading branch information
luca-peruzzo authored Dec 17, 2024
1 parent 2aff865 commit c80a024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/primeng/src/usestyle/usestyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class UseStyle {
const { immediate = true, manual = false, name = `style_${++_id}`, id = undefined, media = undefined, nonce = undefined, first = false, props = {} } = options;

if (!this.document) return;
styleRef = this.document.querySelector(`style[data-primeng-style-id="${name}"]`) || this.document.getElementById(id) || this.document.createElement('style');
styleRef = this.document.querySelector(`style[data-primeng-style-id="${name}"]`) || (id && this.document.getElementById(id)) || this.document.createElement('style');

if (!styleRef.isConnected) {
cssRef = css;
Expand Down

0 comments on commit c80a024

Please sign in to comment.