Browse Source

fix a fixer

Gregg Tavares 6 years ago
parent
commit
2caae7c4e4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      threejs/lessons/resources/lesson.js

+ 3 - 0
threejs/lessons/resources/lesson.js

@@ -308,6 +308,9 @@ $(document).ready(function($){
   const classRE = /^(\w+)$/;
   const classRE = /^(\w+)$/;
   $('a').each(function() {
   $('a').each(function() {
     const href = this.getAttribute('href');
     const href = this.getAttribute('href');
+    if (!href) {
+      return;
+    }
     const m = methodPropertyRE.exec(href);
     const m = methodPropertyRE.exec(href);
     if (m) {
     if (m) {
       const codeKeywordLink = getKeywordLink(m[1]);
       const codeKeywordLink = getKeywordLink(m[1]);