New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

typesettable

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typesettable - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

15

build/src/contexts/svg.js

@@ -63,9 +63,12 @@ /**

if (element.getBBox) {
var _a = element.getBBox(), width = _a.width, height = _a.height;
// copy to prevent NoModificationAllowedError
return { width: width, height: height };
try {
var _a = element.getBBox(), width = _a.width, height = _a.height;
// copy to prevent NoModificationAllowedError
return { width: width, height: height };
}
catch (err) {
}
}
else {
return { height: 0, width: 0 };
}
// if can't get valid bbox, return 0,0
return { height: 0, width: 0 };
};

@@ -72,0 +75,0 @@ return SvgUtils;

2

package.json
{
"name": "typesettable",
"version": "3.0.1",
"version": "3.0.2",
"description": "A typesetting library for SVG and Canvas",

@@ -5,0 +5,0 @@ "main": "build/src/index.js",

@@ -57,8 +57,13 @@ /**

if (element.getBBox) {
const { width, height } = element.getBBox();
// copy to prevent NoModificationAllowedError
return { width, height };
} else {
return { height: 0, width: 0 };
try {
const { width, height } = element.getBBox();
// copy to prevent NoModificationAllowedError
return { width, height };
} catch (err) {
// swallow any errors that occur (Firefox Linux)
}
}
// if can't get valid bbox, return 0,0
return { height: 0, width: 0 };
}

@@ -65,0 +70,0 @@ }

@@ -146,9 +146,12 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Typesetter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

if (element.getBBox) {
var _a = element.getBBox(), width = _a.width, height = _a.height;
// copy to prevent NoModificationAllowedError
return { width: width, height: height };
try {
var _a = element.getBBox(), width = _a.width, height = _a.height;
// copy to prevent NoModificationAllowedError
return { width: width, height: height };
}
catch (err) {
}
}
else {
return { height: 0, width: 0 };
}
// if can't get valid bbox, return 0,0
return { height: 0, width: 0 };
};

@@ -155,0 +158,0 @@ return SvgUtils;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc