Skip to content
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@huggingface/hub": "2.4.0",
"hightable": "0.18.1",
"hyperparam": "0.3.6",
"hyperparam": "0.3.7",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
5 changes: 4 additions & 1 deletion src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export default function App() {
* Note that the iframe has no access to the parent window's location, so
* it might already by in sync, we just don't know.
*/
window.parent.postMessage({ queryString: window.location.search }, 'https://huggingface.co')
const huggingfaceOrigin = 'https://huggingface.co'
if (window.parent.origin === huggingfaceOrigin) {
window.parent.postMessage({ queryString: window.location.search }, huggingfaceOrigin)
}

return <ConfigProvider value={config}>
<Page source={source} navigation={{ row, col }} />
Expand Down
3 changes: 1 addition & 2 deletions src/lib/huggingfaceSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ export function getHuggingFaceSource(sourceId: string, options?: {requestInit?:
fetchVersions,
}
}
} catch (e) {
console.error(e)
} catch {
return undefined
}
}
Expand Down
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default defineConfig({
}
},
optimizeDeps: {
// only for dev, not for build
exclude: ["hyperparam"],
},
}
})