javascript - TypeError:无法读取未定义的属性“toString”,地图未加载
问题描述
我在这里阅读了其他类似的问题,但我不是开发人员,所以我需要初学者(或真正的傻瓜)的答案来尝试修复我的小网站。
我收到此错误,这使我的目录站点无法在地图上加载列表(从而使站点无法运行):
JQMIGRATE: Migrate is installed, version 1.4.1
map-template.js?ver=1.0.0:669 Uncaught TypeError: Cannot read property 'toString' of undefined
at Object.<anonymous> (map-template.js?ver=1.0.0:669)
at Function.each (jquery.js?ver=1.12.4-wp:2)
at HTMLSelectElement.<anonymous> (map-template.js?ver=1.0.0:668)
at Function.each (jquery.js?ver=1.12.4-wp:2)
at Object.apply_meta_filter (map-template.js?ver=1.0.0:660)
at Object.filter (map-template.js?ver=1.0.0:556)
at Object.success (map-template.js?ver=1.0.0:195)
at i (jquery.js?ver=1.12.4-wp:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
at x (jquery.js?ver=1.12.4-wp:4)
(anonymous) @ map-template.js?ver=1.0.0:669
each @ jquery.js?ver=1.12.4-wp:2
(anonymous) @ map-template.js?ver=1.0.0:668
each @ jquery.js?ver=1.12.4-wp:2
apply_meta_filter @ map-template.js?ver=1.0.0:660
filter @ map-template.js?ver=1.0.0:556
(anonymous) @ map-template.js?ver=1.0.0:195
i @ jquery.js?ver=1.12.4-wp:2
fireWith @ jquery.js?ver=1.12.4-wp:2
x @ jquery.js?ver=1.12.4-wp:4
c @ jquery.js?ver=1.12.4-wp:4
XMLHttpRequest.send (async)
send @ jquery.js?ver=1.12.4-wp:4
ajax @ jquery.js?ver=1.12.4-wp:4
n.<computed> @ jquery.js?ver=1.12.4-wp:4
getJSON @ jquery.js?ver=1.12.4-wp:4
init @ map-template.js?ver=1.0.0:182
(anonymous) @ map-template.js?ver=1.0.0:2029
(anonymous) @ map-template.js?ver=1.0.0:2282
我可以自己解决这个问题吗?
非常感谢您的帮助!亲切的问候,米拉
解决方案
没有一些详细的上下文很难理解一个问题。但是,我可以看到,您正在尝试显示一些列表,其中一些列表项未定义(undefined
)或具有undefined
字段。所以这些undefined
值不能转换成字符串(toString()
)。
我可能是错的,但我可以建议检查所有要显示的项目及其字段的存在。
推荐阅读
- googletest - 突变测试因Mull而失败
- video - 使用 wget 从 URL 下载嵌入的视频
- angular - 跨多个 mat-steps 使用高级自定义验证
- javascript - 如何从文本框中接受多个关键字并将它们附加到 .js 中?
- tableau-api - 如何在画面仪表板中默认最高版本过滤器?
- v8 - V8 垃圾收集因 ObjectTemplate 和使用它们创建的对象而异
- css - 有一个固定的
当我滚动时它不会自行移动 - clojure - 如何对这个 clojure fibonacci 生成器进行心智建模?
- python - Pandas Python中的子图多列
- javascript - 使用 jQuery 在 DOM 中查找最近的下一个元素