获取警告弃用:moment.updateLocale();与locales js的时刻

时间:2017-09-02 09:24:19

标签: javascript

当我使用moment-with-locales.min.js时,我在firefox中得到了警告弃用,并且不能使用本地languange发出此警告。

以下是来自控制台的消息:

      "Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."

我如何解决这个问题? 感谢。

1 个答案:

答案 0 :(得分:0)

找到正在调用引发此警告的moment.js的脚本。编辑脚本并搜索“ .defineLocale(”),然后替换为“ .updateLocale(”。

相关问题