mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-04 08:30:39 +00:00
Merge pull request #260 from AtkinsSJ/fix-silly-mistakes
Fix permission check for closeApp message
This commit is contained in:
+2
-2
@@ -1116,9 +1116,9 @@ window.addEventListener('message', async (event) => {
|
||||
}
|
||||
|
||||
// Check permissions
|
||||
const allowed = (() => {
|
||||
const allowed = await (async () => {
|
||||
// Parents can close their children
|
||||
if (target_window.dataset['parent_instance_id']) {
|
||||
if (target_window.dataset['parent_instance_id'] === appInstanceID) {
|
||||
console.log(`⚠️ Allowing app ${appInstanceID} to close child app ${targetAppInstanceID}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user