Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #529 from Flamenco/fx_canvas_undefined_v2

Fix 'canvas not defined' issue #503 #517
commit 67cd0d6b3cb31670c885599bcc85dde0708cf4a7 2 parents 653f94a + ef47c09
@MrRio authored
Showing with 5 additions and 1 deletion.
  1. +1 −1  libs/html2pdf.js
  2. +4 −0 libs/require/config.js
View
2  libs/html2pdf.js
@@ -6,7 +6,7 @@
* http://opensource.org/licenses/mit-license
*/
-html2pdf = function(html,pdf,callback) {
+function html2pdf (html,pdf,callback) {
var canvas = pdf.canvas;
if (!canvas) {
alert('jsPDF canvas plugin not installed');
View
4 libs/require/config.js
@@ -13,6 +13,9 @@
* This allows a host page to simply include require.js and bootstrap the page with a single require statement.
*/
+// Skip if Require.JS not installed
+if (typeof require === 'object') {
+
if (typeof require_baseUrl_override === 'undefined'){
require_baseUrl_override = '../';
}
@@ -113,3 +116,4 @@ require.config({
'html2pdf': 'libs/html2pdf'
}
});
+} // Require.JS

6 comments on commit 67cd0d6

@aendrew

Could we please get a new build and a release of this? I consume dependencies via Bower and this is preventing me from using the latest version...

@ajoah

+1

@grofit

+1

@stevewillard

+1 please add to NPM

Please sign in to comment.
Something went wrong with that request. Please try again.