diff --git a/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js b/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js index e1dcea29d76d87..5f5f2e491be4a0 100644 --- a/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js +++ b/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js @@ -117,15 +117,11 @@ function setUpTimers() { } function setUpAlert() { - var RCTAlertManager = require('NativeModules').AlertManager; if (!GLOBAL.alert) { GLOBAL.alert = function(text) { - var alertOpts = { - title: 'Alert', - message: '' + text, - buttons: [{'cancel': 'OK'}], - }; - RCTAlertManager.alertWithArgs(alertOpts, function () {}); + // Require Alert on demand. Requiring it too early can lead to issues + // with things like Platform not being fully initialized. + require('Alert').alert('Alert', '' + text); }; } }