mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: add check for decode
This commit is contained in:
1 parent
013ab1a049
commit
a29c4ebf77
2 files changed
+3
-1
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.5.13",
|
"version": "4.5.14",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
@@ -115,6 +115,7 @@
|
|||||||
"nunjucks": "^3.2.3",
|
"nunjucks": "^3.2.3",
|
||||||
"prismjs": "^1.23.0",
|
"prismjs": "^1.23.0",
|
||||||
"streamsaver": "^2.0.5",
|
"streamsaver": "^2.0.5",
|
||||||
|
"vite": "^2.1.5",
|
||||||
"web-streams-polyfill": "^3.0.2",
|
"web-streams-polyfill": "^3.0.2",
|
||||||
"xss": "^1.0.8",
|
"xss": "^1.0.8",
|
||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
|
|||||||
async function loadSubjective() {
|
async function loadSubjective() {
|
||||||
try {
|
try {
|
||||||
const props = yaml.load(base64.decode(document.getElementsByClassName('section__body typo')[0].innerText));
|
const props = yaml.load(base64.decode(document.getElementsByClassName('section__body typo')[0].innerText));
|
||||||
|
if (!(props instanceof Array)) return;
|
||||||
$('.outer-loader-container').show();
|
$('.outer-loader-container').show();
|
||||||
const { default: Subjective } = await import('vj/components/subjective-question/index');
|
const { default: Subjective } = await import('vj/components/subjective-question/index');
|
||||||
const React = await import('react');
|
const React = await import('react');
|
||||||
|
|||||||
Reference in new issue
Block a user