Skip to content
Draft
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.4] - 2025-12-09

### Fixed

- Fixed project export on macOS Safari - @imaginarny

## [2.4.3] - 2025-11-01

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kaplayground",
"type": "module",
"version": "2.4.3",
"version": "2.4.4",
"bin": "scripts/cli.js",
"scripts": {
"dev": "vite dev",
Expand Down
14 changes: 8 additions & 6 deletions src/util/download.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
export const downloadBlob = async (blob: Blob, filename: string) => {
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
const reader = new FileReader();

a.href = url;
a.download = filename;
a.click();
reader.onloadend = () => {
const a = document.createElement("a");
a.href = reader.result as string;
a.download = filename;
a.click();
};

URL.revokeObjectURL(url);
reader.readAsDataURL(blob);
};