Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Resolved namespace rendering

  • Loading branch information...
commit f8bbae54e23c0e7dc01cbc45e8c457c05706a8ab 1 parent efe1b3a
@vinch vinch authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/expose.js
View
2  lib/expose.js
@@ -64,7 +64,7 @@ function renderNamespace(str){
return str.split('.').map(function(part, i){
parts.push(part);
part = parts.join('.');
- return (i ? '' : 'window.') + part + ' = ' + part + ' || {};';
+ return (i ? '' : 'window.') + part + ' = typeof ' + part + ' !== \'undefined\' ? ' + part + ' : {};';
}).join('\n');
}
Please sign in to comment.
Something went wrong with that request. Please try again.