File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 1- """
2- Version of Mr beam plugin
3- """
4- __version__ = "0.10.3"
1+ __version__ = "0.10.1-hotfix.2"
Original file line number Diff line number Diff line change @@ -1191,12 +1191,26 @@ $(function () {
11911191 }
11921192 if ( declaredUnit === "px" || declaredUnit === "" ) {
11931193 if ( generator . generator === "inkscape" ) {
1194- if (
1195- window . compareVersions (
1196- generator . version ,
1194+ let isOldInkscapeVersion = NaN ;
1195+ try {
1196+ isOldInkscapeVersion = window . compareVersions (
1197+ // 1.1.2 (1:1.1+202202050950+0a00cf5339) -> 1.1
1198+ generator . version . split ( '.' ) . slice ( 0 , 2 ) . join ( '.' ) ,
11971199 "0.91"
1198- ) <= 0
1199- ) {
1200+ ) <= 0 ;
1201+ } catch ( e ) {
1202+ let payload = {
1203+ error : e . message ,
1204+ } ;
1205+ self . _sendAnalytics ( "inkscape_version_comparison_error" , payload ) ;
1206+ console . log ( "inkscape_version_comparison_error: " , e ) ;
1207+ // In case the comparison fails, we assume the version to be above 0.91
1208+ // This assumption (the scaling) does not have a major impact as it has
1209+ // been the case in the plugin up till 0.10.1-hotfix.2
1210+ isOldInkscapeVersion = true ;
1211+ }
1212+
1213+ if ( isOldInkscapeVersion ) {
12001214 // console.log("old inkscape, px @ 90dpi");
12011215 declaredUnit = "px_inkscape_old" ;
12021216 } else {
You can’t perform that action at this time.
0 commit comments