marcoslin / angularAMD

Facilitate use of RequireJS in AngularJS
http://marcoslin.github.io/angularAMD
MIT License
734 stars 171 forks source link

DeferredString in sample site's Module tab returning `[object object]` when using angular 1.3 #101

Closed marcoslin closed 9 years ago

marcoslin commented 9 years ago

The problem is related to change to the promise object in angularjs 1.3. In the angularjs 1.2.x and prior, promise interface was available directly in the object returned, so such code to detect promise would work:

// ngWrite is found in scope.  Check if promised has been returned
if (inval.hasOwnProperty("then")) {
    ...
}

However, as of angularjs 1.3, these properties are now prototype inherited which break code above.