Skip to content

Commit 67cd0d6

Browse files
committed
Merge pull request #529 from Flamenco/fx_canvas_undefined_v2
Fix 'canvas not defined' issue #503 #517
2 parents 653f94a + ef47c09 commit 67cd0d6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

libs/html2pdf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* http://opensource.org/licenses/mit-license
77
*/
88

9-
html2pdf = function(html,pdf,callback) {
9+
function html2pdf (html,pdf,callback) {
1010
var canvas = pdf.canvas;
1111
if (!canvas) {
1212
alert('jsPDF canvas plugin not installed');

libs/require/config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* This allows a host page to simply include require.js and bootstrap the page with a single require statement.
1414
*/
1515

16+
// Skip if Require.JS not installed
17+
if (typeof require === 'object') {
18+
1619
if (typeof require_baseUrl_override === 'undefined'){
1720
require_baseUrl_override = '../';
1821
}
@@ -113,3 +116,4 @@ require.config({
113116
'html2pdf': 'libs/html2pdf'
114117
}
115118
});
119+
} // Require.JS

0 commit comments

Comments
 (0)