Skip to content

Commit a04e81d

Browse files
authored
Merge pull request #6906 from plotly/improve-amdefine-test
improve amdefine and requirejs against an empty object
2 parents b251947 + 96d5019 commit a04e81d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tasks/test_amdefine.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if(typeof define !== 'function') {
1616
define(function(require) {
1717
var plotly = require('../dist/plotly.min.js');
1818

19-
if(plotly) {
19+
if(plotly && plotly.PlotSchema) {
2020
console.log(plotly);
2121
} else {
2222
throw 'Error: loading with amdefine';

tasks/test_requirejs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ requirejs.config({
1818

1919
requirejs(['plotly'],
2020
function(plotly) {
21-
if(plotly) {
21+
if(plotly && plotly.PlotSchema) {
2222
console.log(plotly);
2323
} else {
2424
throw 'Error: loading with requirejs';

0 commit comments

Comments
 (0)