kormyen / memex

Simple bookmarks and notes
https://kormyen.github.io/memex/
514 stars 67 forks source link

Data.ndtl does not load completely occasionally #4

Closed kormyen closed 6 years ago

kormyen commented 6 years ago

Will be to do with the new loading setup in main.js

    var client = new XMLHttpRequest();
    client.open('GET', FILELOCATION);
    client.overrideMimeType("text/plain");
    client.onreadystatechange = function(req, res) 
    {
      if (client.responseText.trim() != '')
      {
        client.onreadystatechange = null;
        parent.setup(client.responseText);
      }
    }
    client.send();

Maybe 'onreadystatechange' is being called multiple times (on partial load(?), then on full load) but it currently only actions the first call.

kormyen commented 6 years ago

Fixed https://github.com/kormyen/memex/commit/1a7f8644925c3b0086e421b6b166432759d9aa79