Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not revoke object URL of polyfilled styles #260

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading