fray88
fray88

Reputation: 820

Not able to use require.undef in dojo 1.9

I'm not able to access to the require method 'undef', it's undefined in my require object.

The dojo version I'm using is 1.9

I thought that with the follow flag should be able to use it, but I'm wondering if I'm missing something (plus other properties of the build of course):

var dojoConfig = {
    hasCache: {
        "dojo-undef-api": 1
    }
}

Upvotes: 0

Views: 269

Answers (2)

fray88
fray88

Reputation: 820

Apparently my dojo version has no references to the 'dojo-undef-api' inside its layer. But thanks Ken Franqueiro for the trick in the dojoConfig, I'll have it in mind next time as well.

Upvotes: 0

Ken Franqueiro
Ken Franqueiro

Reputation: 10559

This should work if you define it via dojoConfig.has rather than dojoConfig.hasCache. Dojo reads hasCache from its own default configuration, but it reads the has property from user configuration (e.g. dojoConfig).

Upvotes: 1

Related Questions