File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # v1.2.4
2+ Исправлена ошибка «document.charset is undefined».
3+
14# v1.2.3
25- Правки typings.
36
Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ var hasWindow = typeof window !== 'undefined';
77var hasNavigator = typeof navigator != 'undefined' ;
88var hasScreen = typeof screen != 'undefined' ;
99function getCharset ( ) {
10- return hasDocument ? document . charset . toLowerCase ( ) : '' ;
10+ return hasDocument && typeof document . charset === 'string' ?
11+ document . charset . toLowerCase ( ) :
12+ '' ;
1113}
1214function getHost ( ) {
13- return hasWindow ? window . location . hostname : '' ;
15+ return hasWindow && window . location ? window . location . hostname : '' ;
1416}
1517function getPageUrl ( ) {
16- return hasWindow ? window . location . href : '' ;
18+ return hasWindow && window . location ? window . location . href : '' ;
1719}
1820function getReferrer ( ) {
1921 return hasDocument ? document . referrer : '' ;
Original file line number Diff line number Diff line change @@ -3,13 +3,15 @@ var hasWindow = typeof window !== 'undefined';
33var hasNavigator = typeof navigator != 'undefined' ;
44var hasScreen = typeof screen != 'undefined' ;
55function getCharset ( ) {
6- return hasDocument ? document . charset . toLowerCase ( ) : '' ;
6+ return hasDocument && typeof document . charset === 'string' ?
7+ document . charset . toLowerCase ( ) :
8+ '' ;
79}
810function getHost ( ) {
9- return hasWindow ? window . location . hostname : '' ;
11+ return hasWindow && window . location ? window . location . hostname : '' ;
1012}
1113function getPageUrl ( ) {
12- return hasWindow ? window . location . href : '' ;
14+ return hasWindow && window . location ? window . location . href : '' ;
1315}
1416function getReferrer ( ) {
1517 return hasDocument ? document . referrer : '' ;
Original file line number Diff line number Diff line change 11{
22 "name" : " lyam" ,
33 "description" : " Light Ya.Metrika for sites" ,
4- "version" : " 1.2.3 " ,
4+ "version" : " 1.2.4 " ,
55 "author" : {
66 "name" : " Denis Seleznev" ,
77 "email" : " hcodes@yandex.ru" ,
You can’t perform that action at this time.
0 commit comments