Fix issue with detecting whether positions is an object or not

This commit is contained in:
Nariman Jelveh
2024-03-17 21:16:15 -07:00
parent 8ef6167915
commit 3e2ad61189

View File

@@ -3623,7 +3623,7 @@ window.get_auto_arrange_data = async()=>{
const preferenceValue = await puter.kv.get('user_preferences.auto_arrange_desktop');
is_auto_arrange_enabled = preferenceValue === null ? true : preferenceValue;
const positions = await puter.kv.get('desktop_item_positions')
desktop_item_positions = (positions === null || typeof positions !== 'object') ? {} : positions;
desktop_item_positions = (!positions || typeof positions !== 'object' || Array.isArray(positions)) ? {} : positions;
}
window.clear_desktop_item_positions = async(el_desktop)=>{