tiddly-gittly / tw-echarts

An All-in-one Visualization Framework for TiddlyWiki5 based on ECharts
https://tiddly-gittly.github.io/tw-echarts/
MIT License
48 stars 8 forks source link

ncaught TypeError: Cannot read properties of undefined (reading 'showLoading') #69

Closed linonetwo closed 1 year ago

linonetwo commented 1 year ago

boot.js:214 Uncaught TypeError: Cannot read properties of undefined (reading 'showLoading') $tw.utils.error @ boot.js:214


/*
Display an error and exit
*/
$tw.utils.error = function(err) {
    // Prepare the error message
    var errHeading = ( $tw.language == undefined ? "Internal JavaScript Error" : $tw.language.getString("InternalJavaScriptError/Title") ),
        promptMsg = ( $tw.language == undefined ? "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser" : $tw.language.getString("InternalJavaScriptError/Hint") );
    // Log the error to the console
    console.error($tw.node ? "\x1b[1;31m" + err + "\x1b[0m" : err);

Uncaught TypeError: Cannot read properties of undefined (reading 'showLoading') at EChartsWidget.generateOption (widget.js:277:26) at EChartsWidget.makeRefresh (widget.js:365:12) at eval (widget.js:375:12)

  // 异步更新
  EChartsWidget.prototype.generateOption = function () {
    const that = this;
    this.echartsInstance.showLoading();  // <---
    new Promise(function (resolve) {
      try {
        if (that.text === undefined) {
          if (!that.tiddlerTitle || !$tw.wiki.getTiddler(that.tiddlerTitle)) {
            resolve();
            return;
          }

在更新完插件的时候弹出

linonetwo commented 1 year ago

俺两个月前已经修了