This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch gh-pages in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
The following commit(s) were added to refs/heads/gh-pages by this push: new db77c190 fix: fallback to line-simple if no c is provided db77c190 is described below commit db77c1906dd4b7d872d15c2fc20ce2914902b642 Author: plainheart <y...@all-my-life.cn> AuthorDate: Mon May 2 22:16:28 2022 +0800 fix: fallback to line-simple if no c is provided --- src/common/store.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/store.js b/src/common/store.js index 3179ff60..83f1f026 100644 --- a/src/common/store.js +++ b/src/common/store.js @@ -111,15 +111,17 @@ export function loadExampleCode() { } const glFolder = 'gl' in URL_PARAMS ? 'gl/' : ''; const lang = store.typeCheck ? 'ts' : 'js'; + // fallback to line-simple if no c is provided + const c = URL_PARAMS.c || 'line-simple'; $.ajax( - `${store.cdnRoot}/examples/${lang}/${glFolder}${URL_PARAMS.c}.${lang}?_v_${store.version}`, + `${store.cdnRoot}/examples/${lang}/${glFolder}${c}.${lang}?_v_${store.version}`, { dataType: 'text', success(data) { resolve(data); }, error() { - reject('failed to load example', URL_PARAMS.c); + reject('failed to load example', c); } } ); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org