From 4fcead41e454e7a58e417fe13a248ef35726d075 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Wed, 21 Jan 2015 09:40:58 -0500 Subject: [PATCH] and AMD duck type for those that found a narrow path of success --- loader.js | 5 +++-- tests/all.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/loader.js b/loader.js index 0865745..5f77fa0 100644 --- a/loader.js +++ b/loader.js @@ -54,8 +54,9 @@ var define, requireModule, require, requirejs; registry[name] = new Module(name, deps, callback); }; - // we don't support all of AMD - // define.amd = {}; + // we don't support all of AMD, but this is for compat of those have have + // found the narrow path + define.amd = { }; // we will support petals... define.petal = { }; diff --git a/tests/all.js b/tests/all.js index 3953d5a..147727e 100644 --- a/tests/all.js +++ b/tests/all.js @@ -21,7 +21,7 @@ module('loader.js api', { test('has api', function(){ equal(typeof require, 'function'); equal(typeof define, 'function'); - equal(define.amd, undefined); + ok(define.amd); ok(define.petal); equal(typeof requirejs, 'function'); equal(typeof requireModule, 'function');