Skip to content

Commit

Permalink
requirejs patch for anonymous define()
Browse files Browse the repository at this point in the history
  • Loading branch information
vuongdothanhhuy committed Jul 16, 2014
1 parent 08f795d commit 6f9361b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/jspdf.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ var jsPDF = (function(global) {
jsPDF.version = "1.0.178-debug 2014-06-27T15:34:diegocr";

if (typeof define === 'function' && define.amd) {
define(function() {
define('jsPDF', function() {
return jsPDF;
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion jspdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ var jsPDF = (function(global) {
jsPDF.version = "1.0.0-trunk";

if (typeof define === 'function' && define.amd) {
define(function() {
define('jsPDF', function() {
return jsPDF;
});
} else {
Expand Down

2 comments on commit 6f9361b

@metaman
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch seems to have broken the ability to requirejs in the file. When I require in the latest version I get undefined however if I revert this change everything loads ok. Have you got any ideas? I know you are just naming the module so strange the impact it has had.

@vuongdothanhhuy
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @metaman,
Thank you for your feedback. I'm also quite surprise how could one very simple and legal change can result in undefined in the latest requirejs. I will look into it as soon as I have time. Meanwhile, it would be very welcome if anyone can come and help us! (especially those who master AMD/requirejs).

Please sign in to comment.