前端报错:Cannot read property 'name' of null
程序员文章站
2022-06-07 13:12:38
...
问题挺简单的,但是自己愣是花了一段时间才搞出来问题的起因,好菜啊。
*好好的看看问题所在,在去找错,不然会很费时间。
解决:数据库有一条为空的数据,前端没有做封装,无法读取为null的数据。报错,前台加判断,或者数据库改改,前者好吧
-
page_base_decidedzone.action:93 Uncaught TypeError: Cannot read property 'name' of null
-
at Object.formatter (page_base_decidedzone.action:93)
-
at Object.renderRow (jquery.easyui.min.js:8354)
-
at Object.render (jquery.easyui.min.js:8293)
-
at _4e5 (jquery.easyui.min.js:7318)
-
at jquery.easyui.min.js:7861
-
at Object.success (jquery.easyui.min.js:8472)
-
at fire (jquery-1.8.3.js:974)
-
at Object.fireWith [as resolveWith] (jquery-1.8.3.js:1084)
-
at done (jquery-1.8.3.js:7803)
-
at XMLHttpRequest.callback (jquery-1.8.3.js:8518)
<li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#csdnc-thumbsup"></use>
</svg><span class="name">点赞</span>
<span class="count">1</span>
</a></li>
<li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{"mod":"popu_824"}"><svg class="icon" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-csdnc-Collection-G"></use>
</svg><span class="name">收藏</span></a></li>
<li class="tool-item tool-active is-share"><a href="javascript:;"><svg class="icon" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-csdnc-fenxiang"></use>
</svg>分享</a></li>
<!--打赏开始-->
<!--打赏结束-->
<li class="tool-item tool-more">
<a>
<svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg>
</a>
<ul class="more-box">
<li class="item"><a class="article-report">文章举报</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="person-messagebox">
<div class="left-message"><a href="https://blog.csdn.net/qq_34117624">
<img src="https://profile.csdnimg.cn/E/8/7/3_qq_34117624" class="avatar_pic" username="qq_34117624">
<img src="https://g.csdnimg.cn/static/user-reg-year/1x/4.png" class="user-years">
</a></div>
<div class="middle-message">
<div class="title"><span class="tit"><a href="https://blog.csdn.net/qq_34117624" data-report-click="{"mod":"popu_379"}" target="_blank">毋十三</a></span>
</div>
<div class="text"><span>发布了97 篇原创文章</span> · <span>获赞 8</span> · <span>访问量 2万+</span></div>
</div>
<div class="right-message">
<a href="https://im.csdn.net/im/main.html?userName=qq_34117624" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信
</a>
<a class="btn btn-sm bt-button personal-watch" data-report-click="{"mod":"popu_379"}">关注</a>
</div>
</div>
</div>
上一篇: Java Optional
下一篇: Java-Optional类源码分析
推荐阅读
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object
-
npm ERR! Cannot read property 'path' of null
-
js报错 Cannot read property 'getAttribute' of null
-
webpack报错Cannot read property 'presetToOptions' of undefined
-
JavaScript Uncaught TypeError: Cannot read property 'value' of null
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#
-
el-tooltip组件中content使用Vue-i18n报错TypeError: Cannot read property ‘$t‘ of null
-
Extjs4 tabPanel关闭后打开 cannot read property addcls of null
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object
-
Vue引入echarts报错Error in mounted hook: “TypeError: Cannot read property ‘getAttribute‘ of null“