mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
Provide Visible Error if <py-env> paths is used in a local HTML file (#311)
* Add onscreen error when using py-env paths in local HTTP files without file server * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove redundant code, fix error handling, add 404 error * Lint and Format * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * manage errors loading files * use handleFetchError for handling fetch errors in env Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabio Pliger <fabio.pliger@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ const xPyConfig = customElements.define('py-config', PyConfig);
|
||||
|
||||
// As first thing, loop for application configs
|
||||
const config: PyConfig = document.querySelector('py-config');
|
||||
if (!config){
|
||||
if (!config) {
|
||||
const loader = document.createElement('py-config');
|
||||
document.body.append(loader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user