From 1c09ee1fbcd2beaf9cbd780a744637824c6a537d Mon Sep 17 00:00:00 2001 From: Ibby Date: Tue, 24 Jan 2017 15:00:20 -0500 Subject: [PATCH] fix(screen-orientation): lockOrientation returns a promise closes #939 --- src/plugins/screen-orientation.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/screen-orientation.ts b/src/plugins/screen-orientation.ts index 15e0b42c0..0e59d13c3 100644 --- a/src/plugins/screen-orientation.ts +++ b/src/plugins/screen-orientation.ts @@ -49,9 +49,10 @@ export class ScreenOrientation { * Lock the orientation to the passed value. * See below for accepted values * @param orientation {string} The orientation which should be locked. Accepted values see table below. + * @returns {Promise} returns a promise that resolves when the screen orientation is locked, and rejects when an error occurs. */ - @Cordova({ sync: true }) - static lockOrientation(orientation: string): void { } + @Cordova({ otherPromise: true }) + static lockOrientation(orientation: string): Promise { return } /** * Unlock and allow all orientations.