浏览代码

fix a fixer

Gregg Tavares 6 年之前
父节点
当前提交
2caae7c4e4
共有 1 个文件被更改,包括 3 次插入0 次删除
  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+)$/;
   $('a').each(function() {
     const href = this.getAttribute('href');
+    if (!href) {
+      return;
+    }
     const m = methodPropertyRE.exec(href);
     if (m) {
       const codeKeywordLink = getKeywordLink(m[1]);