Skip to content

Commit

Permalink
Do not revoke object URL of polyfilled styles
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed Oct 14, 2024
1 parent d63ba8d commit 80d21ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export async function transformCSS(
// Wait for new stylesheet to be loaded
await promise;
el.remove();
URL.revokeObjectURL(url);
updatedObject.el = link;
} else if (el.hasAttribute('data-has-inline-styles')) {
// Handle inline styles
Expand Down
1 change: 0 additions & 1 deletion tests/unit/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { transformCSS } from '../../src/transform.js';
describe('transformCSS', () => {
beforeAll(() => {
global.URL.createObjectURL = vi.fn().mockReturnValue('/updated.css');
global.URL.revokeObjectURL = vi.fn();
});

it('parses and removes new anchor positioning CSS after transformation to JS', async () => {
Expand Down

0 comments on commit 80d21ef

Please sign in to comment.