function loadLocale(name) {
var oldLocale = null;
// TODO: Find a better way to register and load all the locales in Node
- if (!locales[name] && !isUndefined(module) &&
+ if (!locales[name] && (typeof module !== "undefined") &&
module && module.exports) {
try {
oldLocale = globalLocale._abbr;
import isUndefined from './is-undefined';
function warn(msg) {
- if (hooks.suppressDeprecationWarnings === false && !isUndefined(console) && console.warn) {
+ if (hooks.suppressDeprecationWarnings === false &&
+ (typeof console !== "undefined") && console.warn) {
console.warn('Deprecation warning: ' + msg);
}
}